Skip to content

Commit 4c43190

Browse files
committed
Merge pull request #11 from davidchin/travis
Add travis and revert back to phantomjs
2 parents 8935903 + 3456892 commit 4c43190

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
node_js:
3+
- 0.12
4+
sudo: false
5+
install:
6+
- npm install
7+
- bundle install
8+
script:
9+
- npm test

karma.conf.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = function(config) {
55
frameworks: ['browserify', 'jasmine'],
66

77
files: [
8+
'node_modules/es5-shim/es5-shim.js',
89
'node_modules/react/dist/react.js',
910
'node_modules/react-dom/dist/react-dom.js',
1011
'node_modules/lodash/index.js',
@@ -37,15 +38,6 @@ module.exports = function(config) {
3738
]
3839
},
3940

40-
customLaunchers: {
41-
ChromeCustom: {
42-
base: 'Chrome',
43-
flags: [
44-
'--window-size=300,300'
45-
]
46-
}
47-
},
48-
4941
reporters: ['progress'],
5042

5143
port: 9876,
@@ -56,7 +48,7 @@ module.exports = function(config) {
5648

5749
autoWatch: true,
5850

59-
browsers: ['ChromeCustom'],
51+
browsers: ['PhantomJS'],
6052

6153
singleRun: false
6254
})

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"browserify": "^11.0.0",
2828
"browserify-shim": "^3.8.10",
2929
"del": "^1.2.0",
30+
"es5-shim": "^4.4.1",
3031
"eslint": "^1.10.2",
3132
"eslint-config-airbnb": "^1.0.2",
3233
"eslint-plugin-react": "^3.10.0",
@@ -50,8 +51,8 @@
5051
"karma": "^0.13.8",
5152
"karma-babel-preprocessor": "^5.2.1",
5253
"karma-browserify": "^4.3.0",
53-
"karma-chrome-launcher": "^0.2.2",
5454
"karma-jasmine": "^0.3.6",
55+
"karma-phantomjs-launcher": "^0.2.1",
5556
"lodash": "^3.10.0",
5657
"phantomjs": "^1.9.17",
5758
"react": "^0.14.0",

test/InputRange.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,11 @@ describe('InputRange', () => {
335335

336336
beforeEach(() => {
337337
onChangeComplete = jasmine.createSpy('onChangeComplete');
338-
mouseDownEvent = new MouseEvent('mousedown', { bubbles: true });
339-
mouseUpEvent = new MouseEvent('mouseup', { bubbles: true });
338+
mouseDownEvent = document.createEvent('MouseEvent');
339+
mouseUpEvent = document.createEvent('MouseEvent');
340+
341+
mouseDownEvent.initMouseEvent('mousedown', true);
342+
mouseUpEvent.initMouseEvent('mouseup', true);
340343

341344
inputRange = renderComponent(
342345
<InputRange maxValue={20} minValue={0} value={value} onChange={onChange} onChangeComplete={onChangeComplete}/>

0 commit comments

Comments
 (0)