-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathtestem.js
More file actions
56 lines (50 loc) · 1.75 KB
/
testem.js
File metadata and controls
56 lines (50 loc) · 1.75 KB
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
const FailureOnlyReporter = require('testem-failure-only-reporter');
const variants = [
// When true, even deprecations that are not yet at the "enabled" version will
// be enabled, so we can ensure that they and their tests will continue to
// function correctly when we hit the enabled version.
'ALL_DEPRECATIONS_ENABLED',
// This overrides the current version of ember for purposes of seeing how
// deprecations behave. We use it in CI to prove that after a deprecation has
// hit its "until" version, the tests for it will behave correctly.
'OVERRIDE_DEPRECATION_VERSION',
// This enables all canary feature flags for unreleased feature within Ember
// itself.
'ENABLE_OPTIONAL_FEATURES',
// Throw on unexpected deprecations. Defaults to true if not set explicitly.
'RAISE_ON_DEPRECATION',
];
let queryString = '';
for (let variant of variants) {
if (process.env[variant]) {
// eslint-disable-next-line no-console
console.log(`Applying variant ${variant}=${process.env[variant]}`);
queryString = `${queryString}&${variant}=${process.env[variant]}`;
}
}
module.exports = {
test_page: `index.html/?${queryString}`,
cwd: 'dist',
timeout: 540,
parallel: 1,
reporter: FailureOnlyReporter,
disable_watching: true,
launch_in_ci: ['Chrome'],
launch_in_dev: ['Chrome'],
browser_start_timeout: 120,
browser_disconnect_timeout: 1200,
browser_args: {
Chrome: {
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900',
].filter(Boolean),
},
},
};