forked from github-education-resources/autograding
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (24 loc) · 787 Bytes
/
jest.config.js
File metadata and controls
27 lines (24 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Setup nock to disable all external calls
const nock = require('nock')
nock.disableNetConnect()
// By default, debug messages are written to the console which can make the test output confusing
// Instead, bind to stdout and hide all debug messages
const processStdoutWrite = process.stdout.write.bind(process.stdout)
process.stdout.write = (str, encoding, cb) => {
return false
}
const processStderrWrite = process.stderr.write.bind(process.stderr)
process.stderr.write = (str, encoding, cb) => {
if (str.match(/Hello/)) return false
processStderrWrite(str, encoding, cb)
}
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
verbose: true,
}