From bd715dfdf453b11908547deb4e3c434da8936538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6nnemann?= Date: Thu, 11 Jun 2015 15:12:02 -0700 Subject: [PATCH] test(createModule): not installing semantic-release's deps all over again --- tests/lib/commit-to-version-test.js | 2 +- tests/lib/create-module.js | 10 +++------- tests/scenarios/ignore.js | 2 +- tests/scenarios/postpublish.js | 4 ++-- tests/scenarios/setup.js | 2 +- tests/scenarios/verify.js | 2 +- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/tests/lib/commit-to-version-test.js b/tests/lib/commit-to-version-test.js index f087ddcc..cfced0ed 100644 --- a/tests/lib/commit-to-version-test.js +++ b/tests/lib/commit-to-version-test.js @@ -16,7 +16,7 @@ module.exports = function (t, message, version, code, name, cwd) { .exec('git commit --allow-empty -m "' + message + '"') .run('npm run prepublish') .code(code) - .stdout(/> semantic-release pre\n\nDetermining new version\n/m) + .stdout(/semantic-release.js pre\n\nDetermining new version\n/m) .end(function (err) { t.error(err, 'nixt') diff --git a/tests/lib/create-module.js b/tests/lib/create-module.js index 3dc77e73..31725a69 100644 --- a/tests/lib/create-module.js +++ b/tests/lib/create-module.js @@ -13,12 +13,9 @@ module.exports = function (input) { var pkg = defaults((typeof input === 'object' ? input : {}), { name: id, version: '0.0.0', - devDependencies: { - 'semantic-release': 'file:../../../' - }, scripts: { - prepublish: 'semantic-release pre', - postpublish: 'semantic-release post' + prepublish: '../../../bin/semantic-release.js pre', + postpublish: '../../../bin/semantic-release.js post' }, publishConfig: { registry: 'http://localhost:4873/' @@ -36,8 +33,7 @@ module.exports = function (input) { 'git add . && ' + 'git config user.email "integration@test" && ' + 'git config user.name "Integration Test" && ' + - 'git commit -m "initial" && ' + - 'npm install' + 'git commit -m "initial"' , efh(cb)(function (stdout) { cb(null, id, cwd) })) diff --git a/tests/scenarios/ignore.js b/tests/scenarios/ignore.js index 3f5537ac..793d352e 100644 --- a/tests/scenarios/ignore.js +++ b/tests/scenarios/ignore.js @@ -26,7 +26,7 @@ module.exports = function (test, createModule) { .cwd(cwd) .run(command) .code(0) - .stdout(/> semantic-release pre\n$/m) + .stdout(/semantic-release.js pre\n$/m) .end(function (err) { t.is(pkg + '', fs.readFileSync(cwd + '/package.json') + '', 'package') t.error(err, 'nixt') diff --git a/tests/scenarios/postpublish.js b/tests/scenarios/postpublish.js index 302b04e9..d7ec9599 100644 --- a/tests/scenarios/postpublish.js +++ b/tests/scenarios/postpublish.js @@ -33,7 +33,7 @@ module.exports = function (test, createModule) { t.plan(1) base.clone() - .stdout(/> semantic-release post\n\nGenerating changelog from.*\nParsed/m) + .stdout(/semantic-release.js post\n\nGenerating changelog from.*\nParsed/m) .run('npm run postpublish') .end(function (err) { t.error(err, 'nixt') @@ -44,7 +44,7 @@ module.exports = function (test, createModule) { t.plan(1) base.clone() - .stdout(/> semantic-release post\n\nGenerating changelog from.*\nParsed/m) + .stdout(/semantic-release.js post\n\nGenerating changelog from.*\nParsed/m) .exec('git checkout `git rev-parse HEAD`') .run('npm run postpublish') .end(function (err) { diff --git a/tests/scenarios/setup.js b/tests/scenarios/setup.js index 707c3bfd..1670f435 100644 --- a/tests/scenarios/setup.js +++ b/tests/scenarios/setup.js @@ -20,7 +20,7 @@ module.exports = function (test, createModule) { nixt() .cwd(cwd) .exec('git remote add origin git@github.com:user/repo.git') - .run('./node_modules/.bin/semantic-release setup') + .run('../../../bin/semantic-release.js setup') .code(0) .end(function (err) { t.error(err, 'nixt') diff --git a/tests/scenarios/verify.js b/tests/scenarios/verify.js index ea251de1..cf333051 100644 --- a/tests/scenarios/verify.js +++ b/tests/scenarios/verify.js @@ -8,7 +8,7 @@ module.exports = function (test, createModule) { createModule({ repository: {}, scripts: { - prepublish: 'semantic-release pre --no-token' + prepublish: '../../../bin/semantic-release.js pre' } }, efh()(function (name, cwd) { t.test('verify package and options before publishing', function (t) {