Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

corti

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corti - npm Package Compare versions

Comparing version 1.0.0-rc.1 to 1.0.0

2

dist/corti.cjs.js
//! Corti - A mock implementation of the browser's SpeechRecognition for automated testing
//! version : 1.0.0-rc.1
//! version : 1.0.0
//! author : Tal Ater @TalAter

@@ -4,0 +4,0 @@ //! license : MIT

//! Corti - A mock implementation of the browser's SpeechRecognition for automated testing
//! version : 1.0.0-rc.1
//! version : 1.0.0
//! author : Tal Ater @TalAter

@@ -4,0 +4,0 @@ //! license : MIT

{
"name": "corti",
"version": "1.0.0-rc.1",
"version": "1.0.0",
"description": "Replace window.SpeechRecognition with a mock object and automate your tests",

@@ -5,0 +5,0 @@ "keywords": ["recognition", "speech", "speechrecognition", "webkitSpeechRecognition"],

@@ -19,3 +19,3 @@ # Corti

#### In node.js
#### In node.js (ESM)

@@ -64,2 +64,23 @@ ```javascript

#### In node.js (CJS)
```javascript
// Jest example
const { SpeechRecognition } = require('corti');
beforeAll(() => {
global.SpeechRecognition = SpeechRecognition;
});
test('SpeechRecognition', () => {
const speech = new globalThis.SpeechRecognition();
const spyFn = jest.fn();
speech.onresult = spyFn;
speech.continuous = true;
speech.start();
speech.say('Hello world');
speech.say('Hello world');
expect(spyFn.mock.calls.length).toBe(2);
});
```
#### In Browser (ESM)

@@ -66,0 +87,0 @@ ```html

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc