Skip to content

Commit 908069b

Browse files
committed
disable ff audio tests on travis ci
1 parent f59ab62 commit 908069b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/spec.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ function getAudio() {
2929
// integration = testing against actual watson servers
3030
var offline = process.env.TEST_MODE !== 'integration';
3131
var chrome = navigator.userAgent.indexOf('Chrome') >=0;
32+
var travis = !!process.env.TRAVIS;
3233

3334
describe("WatsonSpeechToText", function() {
3435

3536
this.timeout(30*1000);
3637

3738
// not sure why, but I can't convince firefox or chrome to actually play <audio> elements during tests
38-
// todo: file a stack overflow or something
39-
(offline ? it : xit)('should transcribe <audio> elements', function(done) {
39+
// also, on travis, the element never appears to stop playing (or, more likely, it nevers starts in the first place)
40+
(offline && !travis ? it : xit)('should transcribe <audio> elements', function(done) {
4041
getConfig().then(function(cfg) {
4142
var audioElement = new Audio();
4243
audioElement.src = "http://localhost:9877/audio.wav";
@@ -56,8 +57,9 @@ describe("WatsonSpeechToText", function() {
5657
});
5758

5859
// firefox can automatically approve getUserMedia, but not playback audio, so offline only
60+
// ...except on travis ci, where it gets NO_DEVICES_FOUND
5961
// chrome can do both, so it gets tested on and offline
60-
(offline || chrome ? it : xit)("should transcribe mic input", function(done) {
62+
(offline && !travis || chrome ? it : xit)("should transcribe mic input", function(done) {
6163
getConfig().then(function(cfg) {
6264
var stt = WatsonSpeechToText.recognizeMicrophone(cfg);
6365
//stt.on('send-json', console.log.bind(console, 'sending'));

0 commit comments

Comments
 (0)