Skip to content

Instantly share code, notes, and snippets.

@youngyou
Created September 6, 2017 03:56
Show Gist options
  • Save youngyou/e3b154072741646bc4ad527db7b9eb55 to your computer and use it in GitHub Desktop.
Save youngyou/e3b154072741646bc4ad527db7b9eb55 to your computer and use it in GitHub Desktop.
karma typescript config
module.exports = function (config) {
config.set({
frameworks: ['jasmine', "karma-typescript"],
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
{ pattern: "test/**/*.ts" },
{ pattern: "src/**/*.ts" }
],
preprocessors: {
"**/*.ts": ["karma-typescript"]
},
exclude: [
'lib/**/*.*'
],
reporters: ['spec', "karma-typescript"],
autoWatch: true,
browsers: ['PhantomJS'],
singleRun: false,
karmaTypescriptConfig: {
// bundlerOptions: {
// transforms: [
// require("karma-typescript-es6-transform")()
// ]
// },
compilerOptions: {
module: "commonjs",
sourceMap: true,
target: "ES5",
lib: [
"dom",
"es2015.promise",
"es2015"
]
},
exclude: ["node_modules"]
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment