Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Commit 43a501f

Browse files
Use ember-cli for tests instead of testem directly
Use ember-cli for testing Moved cross-browser testing options into a separate config Removed testem dependency
1 parent 0b46a9f commit 43a501f

File tree

6 files changed

+75
-62
lines changed

6 files changed

+75
-62
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
- SAUCE_USERNAME=htmlbars-ci
88
- SAUCE_ACCESS_KEY=71947947-f373-4e9c-9166-23038df7ddf2
99
matrix:
10-
- TEST_NODE=1 TEST_BROWSERS=PhantomJS,SL_Chrome_Current,SL_Chrome_Last,SL_Firefox_Current,SL_Firefox_Last,SL_Safari_Current,SL_Safari_Last,SL_IE_11,SL_IE_10,SL_IE_9,SL_IE_8
10+
- TEST_NODE=1 TEST_BROWSERS=1
1111
matrix:
1212
fast_finish: true
1313
before_script:

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,11 @@ info on how HTMLBars is structured and its approach to efficiently building / em
3434

3535
# How to Run Tests
3636

37-
## Via testem
37+
## Via Ember CLI
3838

39-
[Testem](https://github.com/airportyh/testem) is a tool for running tests against
40-
multiple launchers. For instance, Chrome and PhantomJS.
39+
1. Run: `ember test --server`
4140

42-
1. Install Testem: `npm install -g testem`
43-
2. Run testem: `testem` or run Testem with specific browers: `testem -l Safari,Firefox`
44-
45-
Testem is a CI tool, so it will run tests as you change files.
41+
Ember CLI is a CI tool, so it will run tests as you change files.
4642

4743
## On the console with PhantomJS
4844

bin/run-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ var testRuns = RSVP.resolve();
9292

9393
if (process.env.CI && process.env.TEST_BROWSERS) {
9494
testRuns = testRuns.then(function() {
95-
return runBrowserTests('./node_modules/.bin/testem', ['ci', '--port', '7000', '--timeout', '540', '-P', '2', '--launch', process.env.TEST_BROWSERS]);
95+
return runBrowserTests('./node_modules/.bin/ember', ['test', '--port', '7000', '--config-file', './testem-sauce.json']);
9696
});
9797
}
9898

9999
if (!process.env.CI) {
100100
testRuns = testRuns.then(function() {
101-
return runBrowserTests('./node_modules/.bin/testem', ['ci', '--launch', 'PhantomJS']);
101+
return runBrowserTests('./node_modules/.bin/ember', ['test']);
102102
});
103103
}
104104

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"handlebars": "mmun/handlebars.js#new-ast-3238645f",
4343
"morph-range": "^0.1.2",
4444
"qunit": "^0.7.2",
45-
"rsvp": "~3.0.6",
46-
"testem": "0.6.35"
45+
"rsvp": "~3.0.6"
4746
}
4847
}

testem-sauce.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"framework": "qunit",
3+
"test_page": "tests/index.html?hidepassed",
4+
"timeout": 540,
5+
"parallel": 2,
6+
"launchers":
7+
{
8+
"SL_Chrome_Current": {
9+
"command": "./node_modules/.bin/ember-cli-sauce -b chrome -v 39 --no-ct -u <url>",
10+
"protocol": "tap"
11+
},
12+
"SL_Chrome_Last": {
13+
"command": "./node_modules/.bin/ember-cli-sauce -b chrome -v 38 --no-ct -u <url>",
14+
"protocol": "tap"
15+
},
16+
"SL_Firefox_Current": {
17+
"command": "./node_modules/.bin/ember-cli-sauce -b firefox -v 34 --no-ct -u <url>",
18+
"protocol": "tap"
19+
},
20+
"SL_Firefox_Last": {
21+
"command": "./node_modules/.bin/ember-cli-sauce -b firefox -v 33 --no-ct -u <url>",
22+
"protocol": "tap"
23+
},
24+
"SL_Safari_Current": {
25+
"command": "./node_modules/.bin/ember-cli-sauce -b safari -v 8 --no-ct -u <url>",
26+
"protocol": "tap"
27+
},
28+
"SL_Safari_Last": {
29+
"command": "./node_modules/.bin/ember-cli-sauce -b safari -v 7 --no-ct -u <url>",
30+
"protocol": "tap"
31+
},
32+
"SL_IE_11": {
33+
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 11 --no-ct -u <url>",
34+
"protocol": "tap"
35+
},
36+
"SL_IE_10": {
37+
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 10 --no-ct -u <url>",
38+
"protocol": "tap"
39+
},
40+
"SL_IE_9": {
41+
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 9 --no-ct -u <url>",
42+
"protocol": "tap"
43+
},
44+
"SL_IE_8": {
45+
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 8 --no-ct -u <url>",
46+
"protocol": "tap"
47+
}
48+
}
49+
,
50+
"launch_in_dev": [
51+
"PhantomJS",
52+
"Chrome"
53+
],
54+
"launch_in_ci": [
55+
"PhantomJS",
56+
"SL_Chrome_Current",
57+
"SL_Chrome_Last",
58+
"SL_Firefox_Current",
59+
"SL_Firefox_Last",
60+
"SL_Safari_Current",
61+
"SL_Safari_Last",
62+
"SL_IE_11",
63+
"SL_IE_10",
64+
"SL_IE_9",
65+
"SL_IE_8"
66+
]
67+
}

testem.json

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,6 @@
11
{
22
"framework": "qunit",
3-
"test_page": "dist/tests/index.html?hidepassed",
4-
"before_tests": "ember build",
5-
"watch_files": [
6-
"packages/**/*.js",
7-
"tests/**/*.js"
8-
],
9-
"launchers":
10-
{
11-
"SL_Chrome_Current": {
12-
"command": "./node_modules/.bin/ember-cli-sauce -b chrome -v 39 --no-ct -u <url>",
13-
"protocol": "tap"
14-
},
15-
"SL_Chrome_Last": {
16-
"command": "./node_modules/.bin/ember-cli-sauce -b chrome -v 38 --no-ct -u <url>",
17-
"protocol": "tap"
18-
},
19-
"SL_Firefox_Current": {
20-
"command": "./node_modules/.bin/ember-cli-sauce -b firefox -v 34 --no-ct -u <url>",
21-
"protocol": "tap"
22-
},
23-
"SL_Firefox_Last": {
24-
"command": "./node_modules/.bin/ember-cli-sauce -b firefox -v 33 --no-ct -u <url>",
25-
"protocol": "tap"
26-
},
27-
"SL_Safari_Current": {
28-
"command": "./node_modules/.bin/ember-cli-sauce -b safari -v 8 --no-ct -u <url>",
29-
"protocol": "tap"
30-
},
31-
"SL_Safari_Last": {
32-
"command": "./node_modules/.bin/ember-cli-sauce -b safari -v 7 --no-ct -u <url>",
33-
"protocol": "tap"
34-
},
35-
"SL_IE_11": {
36-
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 11 --no-ct -u <url>",
37-
"protocol": "tap"
38-
},
39-
"SL_IE_10": {
40-
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 10 --no-ct -u <url>",
41-
"protocol": "tap"
42-
},
43-
"SL_IE_9": {
44-
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 9 --no-ct -u <url>",
45-
"protocol": "tap"
46-
},
47-
"SL_IE_8": {
48-
"command": "./node_modules/.bin/ember-cli-sauce -b 'internet explorer' -v 8 --no-ct -u <url>",
49-
"protocol": "tap"
50-
}
51-
}
52-
,
3+
"test_page": "tests/index.html?hidepassed",
534
"launch_in_dev": [
545
"PhantomJS",
556
"Chrome"

0 commit comments

Comments
 (0)