Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

ci: test Twig starterkits #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
22 changes: 21 additions & 1 deletion test/cli-init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}));