talater / corti Goto Github PK
View Code? Open in Web Editor NEWπ Replace window.SpeechRecognition with a mock object and automate your tests
License: MIT License
π Replace window.SpeechRecognition with a mock object and automate your tests
License: MIT License
Corti.patch() isn't adding the mock SpeechRecognition object. I keep getting an error that says SpeechRecognition is not a function.
Expect Corti.patch() to add a mock SpeechRecognition. When testing after calling Corti.patch() expect window.SpeechRecognition to be defined.
Getting error that says SpeechRecognition is not a function even after calling Corti.patch(). I tried running the tested from the CortiSpec.js file and I get the same error.
const { Corti } = require('./node_modules/corti/src/corti')
expect(typeof Corti).toBe('object') //test passed
expect(typeof Corti.patch).toBe('function') //test passed
Corti.patch()
excpect(window.SpeechRecognition).toBeDefined() //fails returns undefined
I am trying to test a package I wrote that makes it easier to use the web speech API. Here is the new_test branch where I am trying to use Corti to mock the SpeechRecognition API: https://github.com/matoval/web-voice-command/tree/new_tests
Code that dispatches events currently repeats in several places (e.g. start()
and abort()
methods).
Refactor to a single private method.
Branch | Build failing π¨ |
---|---|
Dependency | grunt |
Current Version | 1.0.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
grunt is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 27 commits.
ccc3163
v1.0.2
e7795dc
Remove iojs from test matrix (#1622)
a6a133b
Remove deprecation warning for coffeescript (#1621) r=@vladikoff
06b377e
https links to webchat.freenode.net and gruntjs.com (#1610)
7c5242f
Use node executable for local grunt bin for Windows support
f6cbb63
Oh right, Windows isnt bash
a9a20da
Try and debug why appveyor is failing on npm
48bba6c
Move to the test script to avoid npm was unexpected at this time.
6b97ac0
Try to fix appveyor script
19003ba
For appveyor, check node version to decide whether to install npm@3
3fcf921
Install npm@3 if npm version is npm 1 or 2
77fc157
Use the local version of grunt to run tests
400601a
Updating devDependencies
6592ad1
Update travis/appveyor to node versions we support
b63aeec
Dont manually install npm, use the version each node version corresponds with
There are 27 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
See code in TalAter/annyang#181
See if can then load it as a dependency into annyang/Speech KITT
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.