diff options
author | 2021-05-28 10:06:22 -0600 | |
---|---|---|
committer | 2021-05-28 10:06:22 -0600 | |
commit | a0055bd985a6afe503e2ad2cb4f14b550b480a0a (patch) | |
tree | d3495a14d26df04714e9bef73b2b0a1bfc9c1faa /packages/create-astro/test/create-astro.test.js | |
parent | 556b9e48e4451d5aedfa0f5863c83560ffd2ee69 (diff) | |
download | astro-a0055bd985a6afe503e2ad2cb4f14b550b480a0a.tar.gz astro-a0055bd985a6afe503e2ad2cb4f14b550b480a0a.tar.zst astro-a0055bd985a6afe503e2ad2cb4f14b550b480a0a.zip |
Create astro fixes (#267)
* Remove create-astro from workspace
* Improve contrast ratio
* Swap blank template for blog template
* Remove counter components from blog template
* Use `latest` astro version
Diffstat (limited to 'packages/create-astro/test/create-astro.test.js')
-rw-r--r-- | packages/create-astro/test/create-astro.test.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/create-astro/test/create-astro.test.js b/packages/create-astro/test/create-astro.test.js index d7abb7e64..aa9323012 100644 --- a/packages/create-astro/test/create-astro.test.js +++ b/packages/create-astro/test/create-astro.test.js @@ -8,24 +8,24 @@ import * as assert from 'uvu/assert'; const CreateAstro = suite('npm init astro'); -const cwd = fileURLToPath(new URL('./fixtures/', import.meta.url)); - -const templates = ['blank', 'starter']; +const cwd = fileURLToPath(path.dirname(import.meta.url)); +const templates = fs.readdirSync(path.join(cwd, '..', 'src', 'templates')); CreateAstro.before(async () => { - await del(cwd); - await fs.promises.mkdir(cwd); + const fixturesDir = path.join(cwd, 'fixtures'); + await del(fixturesDir); + await fs.promises.mkdir(fixturesDir); }); for (const template of templates) { CreateAstro(template, async () => { - const { stdout } = await execa('../../create-astro.js', [`./${template}`, '--template', template, '--skip-install'], { cwd }); + const { stdout } = await execa('../../create-astro.js', [`./${template}`, '--template', template, '--skip-install'], { cwd: path.join(cwd, 'fixtures') }); // test: path should formatted as './{dirName}' assert.not.match(stdout, '././'); const DOES_HAVE = ['.gitignore', 'package.json', 'public', 'src']; - const DOES_NOT_HAVE = ['_gitignore', 'meta.json', 'node_modules']; + const DOES_NOT_HAVE = ['_gitignore', 'meta.json', 'node_modules', 'yarn.lock']; // test: template contains essential files & folders for (const file of DOES_HAVE) { |