-
Notifications
You must be signed in to change notification settings - Fork 267
/
jest.integration.js
37 lines (35 loc) · 1.19 KB
/
jest.integration.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
require('@okta/env').setEnvironmentVarsFromTestEnv(); // Set environment variables from "testenv" file
const SDK_VERSION = require('./package.json').version;
const USER_AGENT = `okta-auth-js/${SDK_VERSION} nodejs/${process.versions.node}`;
const baseConfig = require('./test/support/jest/jest.config');
const config = Object.assign({}, baseConfig, {
roots: [
'test/integration'
],
testMatch: [
'**/test/integration/spec/**/*.{js,ts}'
],
setupFiles: [
'<rootDir>/test/support/nodeExceptions.js',
'<rootDir>/test/support/jest/jest.setup.js',
'<rootDir>/test/support/jest/jest.setup.node.js'
],
testEnvironment: 'node',
globals: Object.assign({}, baseConfig.globals, {
USER_AGENT,
ISSUER: process.env.ISSUER,
USERNAME: process.env.USERNAME,
PASSWORD: process.env.PASSWORD,
}),
testPathIgnorePatterns: baseConfig.testPathIgnorePatterns.concat([
// ingore tests by filename
'myaccount/password'
]),
transformIgnorePatterns: [
'node_modules/(?!(data-uri-to-buffer|formdata-polyfill|fetch-blob|node-fetch)/)',
],
// integration tests need to make network request
// extend timeout to 10s for
testTimeout: 15 * 1000
});
module.exports = config;