diff options
author | 2021-07-06 15:14:22 -0400 | |
---|---|---|
committer | 2021-07-06 15:14:22 -0400 | |
commit | d8ceff5facbbe7d7b358c718e73c2cfaa31cae5a (patch) | |
tree | 6d28a563a60853c7b75ad06673597240b2e0aaee /packages/create-astro/test/external.test.js | |
parent | 2ab625bee86f752ca963a572ee28b93cd94e8643 (diff) | |
download | astro-d8ceff5facbbe7d7b358c718e73c2cfaa31cae5a.tar.gz astro-d8ceff5facbbe7d7b358c718e73c2cfaa31cae5a.tar.zst astro-d8ceff5facbbe7d7b358c718e73c2cfaa31cae5a.zip |
Implements templates from external repos (#603)
* Implements templates from external repos
* Adds a changeset
Diffstat (limited to 'packages/create-astro/test/external.test.js')
-rw-r--r-- | packages/create-astro/test/external.test.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/create-astro/test/external.test.js b/packages/create-astro/test/external.test.js new file mode 100644 index 000000000..9fac8c202 --- /dev/null +++ b/packages/create-astro/test/external.test.js @@ -0,0 +1,29 @@ +import assert from 'assert'; +import execa from 'execa'; +import { FIXTURES_URL } from './helpers.js'; +import { existsSync } from 'fs'; + +async function run(outdir, template) { + //--template cassidoo/shopify-react-astro + await execa('../../create-astro.mjs', [outdir, '--template', template, '--force-overwrite'], { + cwd: FIXTURES_URL.pathname, + }); +} + +const testCases = [ + ['shopify', 'cassidoo/shopify-react-astro'] +]; + +async function tests() { + for(let [dir, tmpl] of testCases) { + await run(dir, tmpl); + + const outPath = new URL('' + dir, FIXTURES_URL); + assert.ok(existsSync(outPath)); + } +} + +tests().catch(err => { + console.error(err); + process.exit(1); +});
\ No newline at end of file |