Commit a08fa21f authored by sergey's avatar sergey

fix tests

parent 245e8673
...@@ -18,8 +18,9 @@ ...@@ -18,8 +18,9 @@
"readable-stream": "*" "readable-stream": "*"
}, },
"devDependencies": { "devDependencies": {
"mocha": "*",
"expect.js": "*", "expect.js": "*",
"memstream": "*" "memorystream": "^0.3.0",
"memstream": "*",
"mocha": "*"
} }
} }
var MemoryStream = require('memstream').MemoryStream; var MemoryStream = require('memorystream');
var agi = require('./../lib') var agi = require('./../lib')
var expect = require('expect.js'); var expect = require('expect.js');
var Context = agi.Context; var Context = agi.Context;
...@@ -179,15 +179,9 @@ describe('Context', function() { ...@@ -179,15 +179,9 @@ describe('Context', function() {
describe('record file', function() { describe('record file', function() {
it('record', function() { it('record', function() {
this.context.recordFile('test', 'wav', '#', function() {}); this.context.recordFile('test', 'wav', '#', 10, function() {});
expect(this.context.sent.join('')).to.eql('STREAM FILE "test" # "\n'); expect(this.context.sent.join('')).to.eql('RECORD FILE "test" wav # 10000 0 1 2\n');
}); });
it('defaults to all digits', function() {
this.context.streamFile('test', function() {});
expect(this.context.sent.join('')).to.eql('STREAM FILE "test" "1234567890#*"\n');
});
}); });
describe('waitForDigit', function() { describe('waitForDigit', function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment