Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
test(meta): enable parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Feb 22, 2017
1 parent d824dac commit 755d192
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"preversion": "npm t",
"postversion": "npm publish && git push --follow-tags",
"pretest": "standard lib test *.js",
"test": "nyc -- tap test/*.js",
"test": "nyc -- tap -J test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
Expand Down
5 changes: 3 additions & 2 deletions test/util/test-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ var cacheDir = path.resolve(__dirname, '../cache')

module.exports = testDir
function testDir (filename) {
var dir = path.join(cacheDir, path.basename(filename, '.js'))
var base = path.basename(filename, '.js')
var dir = path.join(cacheDir, base)
reset(dir)
if (!process.env.KEEPCACHE) {
tap.tearDown(function () {
process.chdir(__dirname)
try {
rimraf.sync(cacheDir)
rimraf.sync(dir)
} catch (e) {
if (process.platform !== 'win32') {
throw e
Expand Down

0 comments on commit 755d192

Please sign in to comment.