fix(test): create polyfills-test.ts for karma test & setup Travis CI

This commit is contained in:
Heo Sangmin
2018-05-19 16:38:21 +09:00
parent be48531517
commit 7fbc68cd1f
9 changed files with 25 additions and 31 deletions

31
src/karma.conf.js Normal file
View File

@@ -0,0 +1,31 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: true
});
};

3
src/polyfills-test.ts Normal file
View File

@@ -0,0 +1,3 @@
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';

View File

@@ -7,7 +7,7 @@
"types": []
},
"exclude": [
"test.ts",
"src/test.ts",
"**/*.spec.ts",
"dist",
"app-builds",

View File

@@ -3,8 +3,6 @@
"compilerOptions": {
"outDir": "../out-tsc/spec",
"module": "commonjs",
"target": "es5",
"baseUrl": "",
"types": [
"jasmine",
"node"
@@ -12,7 +10,7 @@
},
"files": [
"test.ts",
"polyfills.ts"
"polyfills-test.ts"
],
"include": [
"**/*.spec.ts",