ran npm run tdd & generated TDD
This commit is contained in:
5
test/speechSynthesis/speechSynthesis.js
Normal file
5
test/speechSynthesis/speechSynthesis.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = message => {
|
||||
const msg = new SpeechSynthesisUtterance(message);
|
||||
msg.voice = window.speechSynthesis.getVoices()[0];
|
||||
window.speechSynthesis.speak(msg);
|
||||
};
|
||||
13
test/speechSynthesis/speechSynthesis.test.js
Normal file
13
test/speechSynthesis/speechSynthesis.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const speechSynthesis = require('./speechSynthesis.js');
|
||||
|
||||
test('Testing speechSynthesis', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof speechSynthesis === 'function', 'speechSynthesis is a Function');
|
||||
//t.deepEqual(speechSynthesis(args..), 'Expected');
|
||||
//t.equal(speechSynthesis(args..), 'Expected');
|
||||
//t.false(speechSynthesis(args..), 'Expected');
|
||||
//t.throws(speechSynthesis(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user