|
3 | 3 | // https://jstools.dev/karma-config/ |
4 | 4 |
|
5 | 5 | "use strict"; |
| 6 | + |
6 | 7 | const { karmaConfig } = require("@jsdevtools/karma-config"); |
7 | | -let exclude = []; |
| 8 | +const { host } = require("@jsdevtools/host-environment"); |
| 9 | + |
| 10 | +// let exclude = []; |
8 | 11 |
|
9 | | -if (process.env.WINDOWS && process.env.CI) { |
10 | | - // We're running in a Windows CI/CD environment, so Karma-Config will use SauceLabs. |
11 | | - // The following tests tend to fail on SauceLabs, probably due to zero-byte files |
12 | | - // and special characters in the paths. So, exclude them. |
13 | | - exclude.push( |
14 | | - "test/specs/__*/**", |
15 | | - "test/specs/blank/**/*.spec.js", |
16 | | - "test/specs/circular*/**/*.spec.js", |
17 | | - "test/specs/empty/**/*.spec.js", |
18 | | - "test/specs/invalid/**/*.spec.js", |
19 | | - "test/specs/parsers/**/*.spec.js" |
20 | | - ); |
21 | | -} |
| 12 | +// if (host.os.windows && host.ci) { |
| 13 | +// // We're running in a Windows CI/CD environment, so Karma-Config will use SauceLabs. |
| 14 | +// // The following tests tend to fail on SauceLabs, probably due to zero-byte files |
| 15 | +// // and special characters in the paths. So, exclude them. |
| 16 | +// exclude.push( |
| 17 | +// "test/specs/__*/**", |
| 18 | +// "test/specs/blank/**/*.spec.js", |
| 19 | +// "test/specs/circular*/**/*.spec.js", |
| 20 | +// "test/specs/empty/**/*.spec.js", |
| 21 | +// "test/specs/invalid/**/*.spec.js", |
| 22 | +// "test/specs/parsers/**/*.spec.js" |
| 23 | +// ); |
| 24 | +// } |
22 | 25 |
|
23 | 26 | module.exports = karmaConfig({ |
24 | 27 | sourceDir: "lib", |
25 | 28 | fixtures: "test/fixtures/**/*.js", |
26 | 29 | browsers: { |
27 | | - ie: true, |
| 30 | + chrome: !host.os.windows, |
| 31 | + firefox: host.os.linux, |
| 32 | + safari: host.os.linux, // SauceLabs |
| 33 | + edge: host.os.linux, // SauceLabs |
| 34 | + ie: host.os.windows, |
28 | 35 | }, |
29 | | - config: { |
30 | | - exclude, |
31 | | - } |
| 36 | + // config: { |
| 37 | + // exclude, |
| 38 | + // } |
32 | 39 | }); |
0 commit comments