Skip to content

Commit

Permalink
Add failing test for tty.getWindowSize is not a function, #247
Browse files Browse the repository at this point in the history
  • Loading branch information
1999 committed Jun 22, 2019
1 parent 292858c commit 523fb01
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ test 'syntax errors' test/syntax-errors/index.js
test '--require option support' test/require-option/index.sh
test 'run programmatically (base API)' test/run-programmatically/callback/index.js
test 'run programmatically (reporter.done is called)' test/run-programmatically/reporter-done/index.js
test 'run programmatically (worker TTY)' test/run-programmatically/tty-worker/index.js
test '--no-exit option support' test/reporter-end-no-exit/index.js
test 'node native add-on' test/node-native-addon/index.sh
test 'skip-suite' test/skip-suite/index.sh
Expand Down
5 changes: 5 additions & 0 deletions test/run-programmatically/_spec/dummy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('Dummy suite', () => {
it('should finish now', () => {
// pass
});
});
1 change: 1 addition & 0 deletions test/run-programmatically/tty-worker/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check that spec reporter can work in a non-TTY window
16 changes: 16 additions & 0 deletions test/run-programmatically/tty-worker/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node

'use strict';

const MochaParallelTests = require('../../../dist/main/mocha').default;
const mocha = new MochaParallelTests();

mocha
.reporter('spec')
.addFile(`${__dirname}/../_spec/dummy.js`)
.run();

process.on('unhandledRejection', (reason) => {
console.log(`Unhandled promise rejection: ${reason.stack}`);
process.exit(1);
});

0 comments on commit 523fb01

Please sign in to comment.