-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.js
More file actions
19 lines (19 loc) · 689 Bytes
/
Copy pathjest.config.js
File metadata and controls
19 lines (19 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/** @type {import("jest").Config} **/
module.exports = {
testEnvironment: 'node',
preset: 'ts-jest',
transform: {
'^.+\\.ts$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.jest.json' }],
},
testPathIgnorePatterns: ['/temp/'],
transformIgnorePatterns: [
'/node_modules/(?!blocklypy/)', // transform blocklypy
],
moduleNameMapper: {
'^blocklypy$': '<rootDir>/__mocks__/blocklypy.js',
'^@abandonware/noble$': '<rootDir>/__mocks__/@abandonware/noble.js',
'^usb/dist/usb/endpoint$': '<rootDir>/__mocks__/usb.js',
'^usb$': '<rootDir>/__mocks__/usb.js',
},
roots: ['<rootDir>/src', '<rootDir>/__mocks__'],
};