Skip to content

Commit

Permalink
Merge pull request #634 from stephenplusplus/spp--npm-test-fix
Browse files Browse the repository at this point in the history
fix ordering of documentation tests
  • Loading branch information
ryanseys committed May 30, 2015
2 parents 5aff671 + 46a0836 commit b157b41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"scripts": {
"docs": "./scripts/docs.sh",
"lint": "jshint lib/ system-test/ test/",
"test": "npm run docs && mocha test/*",
"test": "npm run docs && mocha test/*/*.js test/docs.js",
"system-test": "mocha system-test/* --timeout 30000",
"cover": "istanbul cover -x 'system-test/*' _mocha -- --timeout 30000 test/* system-test/*",
"coveralls": "istanbul cover -x 'system-test/*' _mocha --report lcovonly -- --timeout 30000 test/* system-test/* -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
"cover": "istanbul cover -x 'system-test/*' _mocha -- --timeout 30000 test/*/*.js test/docs.js system-test/*",
"coveralls": "istanbul cover -x 'system-test/*' _mocha --report lcovonly -- --timeout 30000 test/*/*.js test/docs.js system-test/* -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"license": "Apache 2"
}
6 changes: 3 additions & 3 deletions test/common/docs.js → test/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

var vm = require('vm');
var assert = require('assert');
var gcloud = require('../../');
var gcloud = require('../');
var glob = require('glob');
var mitm = require('mitm');
var fs = require('fs');
Expand Down Expand Up @@ -89,8 +89,8 @@ describe('documentation', function() {
// Replace all references to require('gcloud') with a relative
// version so that the code can be passed into the VM directly.
var code = tag.string
.replace(/require\(\'gcloud\'\)/g, 'require(\'..\/..\/\')')
.replace(/require\(\'gcloud/g, 'require(\'..\/..');
.replace(/require\(\'gcloud\'\)/g, 'require(\'..\/\')')
.replace(/require\(\'gcloud/g, 'require(\'..');
assert.doesNotThrow(runCodeInSandbox.bind(null, code, sandbox));
}
});
Expand Down

0 comments on commit b157b41

Please sign in to comment.