-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
karma.conf.js
51 lines (49 loc) · 1.6 KB
/
karma.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
49
50
51
"use strict"
const babel = require("rollup-plugin-babel")
const commonjs = require("rollup-plugin-commonjs")
// const json = require("rollup-plugin-json")
const resolve = require("rollup-plugin-node-resolve")
const sourcemaps = require("rollup-plugin-sourcemaps")
const typescript = require("rollup-plugin-typescript")
module.exports = function(config) {
config.set({
browsers: ["Chrome", "Firefox", "IE"],
files: ["test/index.ts", "test/polyfill.ts"],
frameworks: ["mocha"],
mime: {
"text/javascript": ["ts"],
},
reporters: ["progress", "growl"],
preprocessors: {
"test/*.ts": ["rollup"],
},
rollupPreprocessor: {
output: {
format: "iife",
name: "AbortControllerShim",
sourcemap: "inline",
},
plugins: [
resolve({ browser: true, preferBuiltins: false }),
sourcemaps(),
commonjs(),
typescript({ module: "es2015" }),
babel({
babelrc: false,
extensions: [".js", ".mjs", ".ts"],
include: ["**/*.mjs", "**/*.ts"],
presets: [
[
"@babel/env",
{
modules: false,
targets: { ie: "11" },
},
],
],
sourceMaps: true,
}),
],
},
})
}