')
38 |
39 | filesystem.remove('public')
40 | process.chdir(prevDir)
41 | })
42 |
43 | test('reads config from package.json', async () => {
44 | const prevDir = process.cwd()
45 |
46 | process.chdir('./__tests__/test-readme/package-json')
47 |
48 | const output = await cli()
49 |
50 | expect(output).toContain(success.replace('public', 'testoutput'))
51 | const css = filesystem.read('testoutput/style.css')
52 |
53 | expect(css).toContain('font-size:18em')
54 |
55 | filesystem.remove('testoutput')
56 | process.chdir(prevDir)
57 | })
58 |
59 | test('generates several files', async () => {
60 | const prevDir = process.cwd()
61 |
62 | process.chdir('./__tests__/test-readme/several-files')
63 |
64 | const output = await cli()
65 |
66 | expect(output).toContain(success)
67 |
68 | expect(filesystem.exists('public/index.html')).toBeTruthy()
69 | expect(filesystem.exists('public/one.html')).toBeTruthy()
70 |
71 | filesystem.remove('public')
72 | process.chdir(prevDir)
73 | })
74 |
75 | test('spectrum test', async () => {
76 | const prevDir = process.cwd()
77 |
78 | process.chdir('./__tests__/test-readme/spectrum')
79 |
80 | const output = await cli()
81 |
82 | expect(output).toContain(success)
83 | const html = filesystem.read('public/index.html')
84 |
85 | expect(html).toContain('Simple, powerful online communities')
86 |
87 | expect(filesystem.exists('public/index.html')).toBeTruthy()
88 |
89 | filesystem.remove('public')
90 | process.chdir(prevDir)
91 | })
92 |
93 | test('noHeader test', async () => {
94 | const prevDir = process.cwd()
95 |
96 | process.chdir('./__tests__/test-readme/noHeader')
97 |
98 | const output = await cli()
99 |
100 | expect(output).toContain(success)
101 |
102 | const html = filesystem.read('public/index.html')
103 |
104 | expect(html).not.toContain('