forked from webrtcHacks/adapter
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request webrtcHacks#25 from webrtc/testling
Adding Javascript tests using testling.
- Loading branch information
Showing
3 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
- 0.10 | ||
|
||
env: | ||
matrix: | ||
- BROWSER=chrome BVER=stable | ||
- BROWSER=chrome BVER=beta | ||
- BROWSER=chrome BVER=unstable | ||
- BROWSER=firefox BVER=stable | ||
- BROWSER=firefox BVER=beta | ||
- BROWSER=firefox BVER=unstable | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
allow_failures: | ||
- env: BROWSER=chrome BVER=unstable | ||
- env: BROWSER=firefox BVER=unstable | ||
|
||
install: | ||
- npm install -g jshint jscs | ||
- npm install | ||
|
||
before_script: | ||
- ./node_modules/travis-multirunner/setup.sh | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
script: | ||
- jshint *.js | ||
- jscs --preset google *.js | ||
- jshint *.js | ||
- jscs --preset google *.js | ||
- npm test | ||
|
||
after_failure: | ||
- for file in *.log; do echo $file; echo "======================"; cat $file; done || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
{ | ||
"name": "webrtc-adapter", | ||
"version": "0.1.0", | ||
"description": "Hide browser differences in WebRTC APIs", | ||
"license": "BSD-3-Clause", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/w3brtc/adapter.git" | ||
}, | ||
"scripts": { | ||
"test": "testling -x start-$BROWSER" | ||
}, | ||
"testling": { | ||
"files": "test/test.js", | ||
"browsers": [ | ||
"chrome/34..latest", | ||
"firefox/25..latest" | ||
] | ||
}, | ||
"devDependencies": { | ||
"browserify": "^10.2.1", | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-jshint": "^0.11.2", | ||
"grunt-contrib-nodeunit": "~0.4.1", | ||
"grunt-contrib-uglify": "~0.5.0" | ||
"grunt-contrib-uglify": "~0.5.0", | ||
"tape": "^4.0.0", | ||
"testling": "^1.7.1", | ||
"travis-multirunner": "^2.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This is a basic test file for use with testling. | ||
// The test script language comes from tape. | ||
var test = require('tape'); | ||
|
||
m = require('../adapter.js'); | ||
|
||
test('Browser identified', function(t) { | ||
t.plan(2); | ||
t.ok(m.webrtcDetectedBrowser, 'Browser detected'); | ||
t.ok(m.webrtcDetectedVersion, 'Browser version detected'); | ||
}); |