forked from ethers-io/ethers.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma-esm.conf.js
48 lines (44 loc) · 1.42 KB
/
karma-esm.conf.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
"use strict";
module.exports = function(config) {
config.set({
frameworks: [ 'mocha' ],
files: [
{ pattern: "./packages/ethers/dist/ethers-all.esm.min.js", type: "module" },
{ pattern: "./packages/tests/dist/tests.esm.js", type: "module" }
],
reporters: [ 'karma' ],
plugins: [
'karma-mocha',
'karma-chrome-launcher',
require('./packages/tests/karma-reporter')
],
port: 9876,
logLevel: config.LOG_INFO,
browsers: [ 'ChromeHeadless', "HeadlessLittleLiar" ],
autoWatch: false,
singleRun: true,
browserNoActivityTimeout: 3600000,
customLaunchers: {
HeadlessLittleLiar: {
base: 'ChromeHeadless',
// https://peter.sh/experiments/chromium-command-line-switches/
flags: [
'--disable-extensions',
// Enable this to help debug CORS issues (otherwise fetch throws a useless TypeError)
//'--disable-web-security',
'--enable-automation',
// Cloudflare will block (on the testnet endpoints) any traffic
// from a headless chome (based on the user agent), so we lie
// This was take from Safari, because that is what I had on-hand
'--user-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15']
}
},
/*
client: {
mocha: {
grep: 'utf',
}
}
*/
})
}