From afd5d2103cd1df197987f96d7c3642ad0d1ddbb6 Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Fri, 2 Nov 2018 10:13:37 +0100 Subject: [PATCH 1/2] ci: test Twig starterkits --- test/cli-init.test.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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(); })); From e68a52500e28f681835be6adb151d74383bd74ca Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Fri, 2 Nov 2018 10:22:44 +0100 Subject: [PATCH 2/2] ci: test tap timeout --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": {