-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Unit Tests for WebRTC Troubleshooter.
- Loading branch information
Showing
26 changed files
with
1,310 additions
and
56 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
repo_token: Oa8nW7MOfdcUA0mvv7zHyYgmWXOHSCRbV |
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 |
---|---|---|
|
@@ -2,3 +2,6 @@ node_modules/ | |
bower_components/ | ||
.idea | ||
npm-debug.log | ||
.vscode | ||
/coverage | ||
/.nyc_output |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
dist: trusty | ||
sudo: required | ||
language: node_js | ||
node_js: | ||
- 6 | ||
after_success: | ||
- npm run coverage | ||
- npm run coveralls |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,9 +1,9 @@ | ||
import AudioTest from './tests/AudioTest'; | ||
import VideoTest from './tests/VideoTest'; | ||
import ConnectivityTest from './tests/ConnectivityTest'; | ||
import AdvancedCameraTest from './tests/AdvancedCameraTest'; | ||
import ThroughputTest from './tests/DataThroughputTest'; | ||
import VideoBandwidthTest from './tests/VideoBandwidthTest'; | ||
import AudioBandwidthTest from './tests/AudioBandwidthTest'; | ||
import AudioTest from './diagnostics/AudioTest'; | ||
import VideoTest from './diagnostics/VideoTest'; | ||
import ConnectivityTest from './diagnostics/ConnectivityTest'; | ||
import AdvancedCameraTest from './diagnostics/AdvancedCameraTest'; | ||
import ThroughputTest from './diagnostics/DataThroughputTest'; | ||
import VideoBandwidthTest from './diagnostics/VideoBandwidthTest'; | ||
import AudioBandwidthTest from './diagnostics/AudioBandwidthTest'; | ||
|
||
export { AudioTest, VideoTest, ConnectivityTest, AdvancedCameraTest, ThroughputTest, VideoBandwidthTest, AudioBandwidthTest }; |
4 changes: 2 additions & 2 deletions
4
src/tests/AdvancedCameraTest.js → src/diagnostics/AdvancedCameraTest.js
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
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,2 @@ | ||
import browserEnv from 'browser-env'; | ||
browserEnv(); |
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,34 @@ | ||
import test from 'ava'; | ||
|
||
import AdvancedCameraTest from '../../src/diagnostics/AdvancedCameraTest'; | ||
|
||
let CameraResolutionStub, options, advancedCameraTest; | ||
test.before(() => { | ||
CameraResolutionStub = { | ||
resolutions: [ | ||
[320, 240] | ||
], | ||
start: Promise.resolve([320, 240]), | ||
deferred: { | ||
resolve: () => [320, 240], | ||
reject: () => 'an error' | ||
} | ||
}; | ||
options = { | ||
mediaStream: document.createElement('video').mediaStream, | ||
duration: 5, | ||
addTest: () => {}, | ||
runNextTest: () => {}, | ||
deferred: { | ||
resolve: () => [320, 240], | ||
reject: () => 'received error' | ||
}, | ||
stopAllTests: () => {} | ||
}; | ||
advancedCameraTest = new AdvancedCameraTest(options); | ||
}); | ||
|
||
test('start() will return undefined if no more tests', async t => { | ||
const actual = await advancedCameraTest.start.call(CameraResolutionStub); | ||
t.is(actual, undefined); | ||
}); |
Oops, something went wrong.