Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 committed Apr 4, 2019
1 parent fc1f55d commit 55a9890
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/cmd/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ class TestCommand extends Command {

// whether is debug mode, if pass --inspect then `debugOptions` is valid
// others like WebStorm 2019 will pass NODE_OPTIONS, and egg-bin itself will be debug, so could detect `process.env.JB_DEBUG_FILE`.

if (debugOptions || process.env.JB_DEBUG_FILE) {
// --no-timeouts
testArgv.timeouts = false;
testArgv.timeout = undefined;
}
console.log('@@@', debugOptions, process.env.JB_DEBUG_FILE, testArgv);

// collect require
let requireArr = testArgv.require || testArgv.r || [];
Expand Down
5 changes: 3 additions & 2 deletions test/lib/cmd/test.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,12 @@ describe('test/lib/cmd/test.test.js', () => {
});
});

describe('no-timeouts', () => {
describe.only('no-timeouts', () => {
it('should timeout', done => {
mm(process.env, 'TEST_TIMEOUT', '5000');
mm(process.env, 'TESTS', 'test/**/no-timeouts.test.js');
coffee.fork(eggBin, [ 'test' ], { cwd })
.expect('stdout', /timeout: 60000/)
.expect('stdout', /timeout: 5000/)
.expect('code', 0)
.end(done);
});
Expand Down

0 comments on commit 55a9890

Please sign in to comment.