diff --git a/package.json b/package.json index c66751a..4ae0f8a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ ], "scripts": { "lint": "eslint ./{bin,test}", - "test": "tap './test/*.test.js' --reporter spec --timeout=120", + "test": "tap './test/*.test.js' --reporter spec --timeout=360", "pretest": "npm run lint && npm install" }, "repository": { diff --git a/test/cli-init.test.js b/test/cli-init.test.js index 4ec9c75..5036773 100644 --- a/test/cli-init.test.js +++ b/test/cli-init.test.js @@ -13,6 +13,26 @@ tap.test('Init ->', t => wrapAsync(function*() { t.ok(exists.sync(path.resolve(projectRoot, 'source')), 'with a source dir'); t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'with a public dir'); t.ok(exists.sync(path.resolve(projectRoot, 'pattern_exports')), 'with a pattern_exports dir'); - t.ok(exists.sync(path.resolve(projectRoot, 'patternlab-config.json')), 'with a pattern_exports dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'patternlab-config.json')), 'with a patternlab-config file'); + t.end(); +})); + +tap.test('Init starterkit-twig-base ->', t => wrapAsync(function*() { + yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', '@pattern-lab/starterkit-twig-base']); + t.ok(exists.sync(path.resolve(projectRoot)), 'should initialize a PatternLab project'); + t.ok(exists.sync(path.resolve(projectRoot, 'source')), 'with a source dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'with a public dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'pattern_exports')), 'with a pattern_exports dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'patternlab-config.json')), 'with a patternlab-config file'); + t.end(); +})); + +tap.test('Init starterkit-twig-demo ->', t => wrapAsync(function*() { + yield spawnCmd(['init', '--verbose', '--project-dir', projectRoot, '--edition', 'edition-node', '--starterkit', '@pattern-lab/starterkit-twig-demo']); + t.ok(exists.sync(path.resolve(projectRoot)), 'should initialize a PatternLab project'); + t.ok(exists.sync(path.resolve(projectRoot, 'source')), 'with a source dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'with a public dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'pattern_exports')), 'with a pattern_exports dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'patternlab-config.json')), 'with a patternlab-config file'); t.end(); }));