forked from microsoft/BotFramework-WebChat
-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.legacy.config.js
80 lines (78 loc) · 2.82 KB
/
jest.legacy.config.js
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
const { defaults } = require('jest-config');
const TRANSFORM_IGNORE_PACKAGES = [
'botframework-webchat-api',
'botframework-webchat-component',
'botframework-webchat-core',
'botframework-webchat',
'character-entities',
'decode-named-character-reference',
'mdast-util-from-markdown',
'mdast-util-to-string',
'micromark-core-commonmark',
'micromark-factory-destination',
'micromark-factory-label',
'micromark-factory-space',
'micromark-factory-title',
'micromark-factory-whitespace',
'micromark-util-character',
'micromark-util-chunked',
'micromark-util-classify-character',
'micromark-util-combine-extensions',
'micromark-util-decode-numeric-character-reference',
'micromark-util-decode-string',
'micromark-util-encode',
'micromark-util-html-tag-name',
'micromark-util-normalize-identifier',
'micromark-util-resolve-all',
'micromark-util-sanitize-uri',
'micromark-util-subtokenize',
'micromark',
'mime',
'unist-util-stringify-position',
'uuid'
];
module.exports = {
displayName: { color: 'yellow', name: 'legacy' },
globals: {
npm_package_version: '0.0.0-0.jest'
},
moduleDirectories: ['node_modules', 'packages'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
rootDir: './',
setupFilesAfterEnv: [
'<rootDir>/__tests__/setup/setupDotEnv.js',
'<rootDir>/__tests__/setup/setupGlobalAgent.js',
'<rootDir>/__tests__/setup/preSetupTestFramework.js',
'<rootDir>/__tests__/setup/setupCryptoGetRandomValues.js',
'<rootDir>/__tests__/setup/setupImageSnapshot.js',
'<rootDir>/__tests__/setup/setupTestNightly.js',
'<rootDir>/__tests__/setup/setupTimeout.js'
],
testMatch: ['**/__tests__/**/*.?([mc])[jt]s?(x)', '**/?(*.)+(spec|test).?([mc])[jt]s?(x)'],
testPathIgnorePatterns: [
'/lib/',
'/node_modules/',
'<rootDir>/__tests__/html/.*?(\\.html)',
'<rootDir>/__tests__/html/__dist__',
'<rootDir>/__tests__/html/__jest__',
'<rootDir>/__tests__/html/assets',
'<rootDir>/__tests__/setup/',
'<rootDir>/packages/bundle/__tests__/types/__typescript__/',
'<rootDir>/packages/core/__tests__/types/__typescript__/',
'<rootDir>/packages/directlinespeech/__tests__/utilities/',
'<rootDir>/packages/playground/',
'<rootDir>/samples/'
],
transform: {
'[\\/]__tests__[\\/]html[\\/]': '<rootDir>/babel-passthru-transformer.js',
'\\.[jt]sx?$': '<rootDir>/babel-jest-config.js'
},
transformIgnorePatterns: [
// jest-environment-jsdom import packages as browser.
// Packages, such as "uuid", export itself for browser as ES5 + ESM.
// Since jest@28 cannot consume ESM yet, we need to transpile these packages.
`/node_modules/(?!(${TRANSFORM_IGNORE_PACKAGES.join('|')})/)`,
'/packages/(?:test/)?\\w+/(?:lib/|dist/|\\w+\\.js)',
...defaults.transformIgnorePatterns.filter(pattern => pattern !== '/node_modules/')
]
};