Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #272 from ipfs/feat/select-tests-by-env
Browse files Browse the repository at this point in the history
select tests by process env
  • Loading branch information
daviddias committed May 26, 2016
2 parents 4502d66 + 05c0cbb commit 1132fec
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions test/node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
'use strict'

require('./core-tests')
require('./http-api-tests')
require('./cli-tests')
let testCore = true
let testHTTP = true
let testCLI = true

if (process.env.TEST) {
switch (process.env.TEST) {
case 'core': {
testHTTP = false
testCLI = false
} break
case 'http': {
testCore = false
testCLI = false
} break
case 'cli': {
testCore = false
testCLI = false
} break
default: break
}
}

if (testCore) {
require('./core-tests')
}

if (testHTTP) {
require('./http-api-tests')
}

if (testCLI) {
require('./cli-tests')
}

0 comments on commit 1132fec

Please sign in to comment.