Skip to content

Commit abcb46d

Browse files
committed
Building on IE via appveyor
* [x] Load karma-ie needed for appveyor * [x] Load IE shims
1 parent dca86d4 commit abcb46d

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

appveyor.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# AppVeyor file
2+
# http://www.appveyor.com/docs/appveyor-yml
3+
# This file: cloned from https://github.com/gruntjs/grunt/blob/master/appveyor.yml
4+
5+
# Build version format
6+
version: "{build}"
7+
8+
# Test against this version of Node.js
9+
environment:
10+
nodejs_version: "5.5.0"
11+
12+
build: off
13+
14+
clone_depth: 10
15+
16+
# Fix line endings on Windows
17+
init:
18+
- git config --global core.autocrlf true
19+
20+
install:
21+
- ps: Install-Product node $env:nodejs_version
22+
- npm install -g npm
23+
- ps: $env:path = $env:appdata + "\npm;" + $env:path
24+
- npm install
25+
26+
test_script:
27+
# Output useful info for debugging.
28+
- node --version && npm --version
29+
- node -e 'console.log(process.env);'
30+
# We test multiple Windows shells because of prior stdout buffering issues
31+
# filed against Grunt. https://github.com/joyent/node/issues/3584
32+
- ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
33+
- cmd: npm test
34+
35+
cache:
36+
- node_modules -> package.json # local npm modules

karma.conf.js

+13-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ module.exports = function(config) {
1919
]
2020
},
2121

22-
files: [
22+
files: [
2323
'node_modules/traceur/bin/traceur-runtime.js',
24+
//<!-- IE required polyfills, in this exact order -->
25+
'node_modules/es6-shim/es6-shim.min.js',
26+
'node_modules/systemjs/dist/system-polyfills.js',
27+
'node_modules/angular2/es6/dev/src/testing/shims_for_IE.js',
28+
2429
'node_modules/angular2/bundles/angular2-polyfills.js',
2530
// 'node_modules/zone.js/dist/zone-microtask.js',
2631
// 'node_modules/zone.js/dist/long-stack-trace-zone.js',
@@ -33,7 +38,6 @@ module.exports = function(config) {
3338
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
3439
{ pattern: 'app/**/*.js', included: false, watched: true },
3540
{ pattern: 'test/test-helpers/*.js', included: false, watched: true },
36-
{ pattern: 'node_modules/systemjs/dist/system-polyfills.js', included: false, watched: false },
3741

3842
// paths loaded via Angular's component compiler
3943
// (these paths need to be rewritten, see proxies section)
@@ -55,8 +59,14 @@ module.exports = function(config) {
5559
colors: true,
5660
logLevel: config.LOG_INFO,
5761
autoWatch: false,
58-
singleRun: true
62+
singleRun: true,
5963
};
6064

65+
if (process.env.APPVEYOR) {
66+
configuration.browsers = ['IE'];
67+
configuration.singleRun = true;
68+
configuration.browserNoActivityTimeout = 90000; // Note: default value (10000) is not enough
69+
}
70+
6171
config.set(configuration);
6272
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"jasmine-core": "~2.4.1",
5959
"karma": "~0.13.21",
6060
"karma-coverage": "~0.5.3",
61+
"karma-ie-launcher": "^0.2.0",
6162
"karma-jasmine": "~0.3.7",
6263
"karma-phantomjs-launcher": "~1.0.0",
6364
"karma-sourcemap-loader": "^0.3.7",

0 commit comments

Comments
 (0)