New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-when

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-when - npm Package Compare versions

Comparing version 2.8.0 to 2.8.1

12

package.json
{
"name": "jest-when",
"version": "2.8.0",
"version": "2.8.1",
"description": "An extension lib for jest",

@@ -26,2 +26,6 @@ "license": "MIT",

"devDependencies": {
"@stryker-mutator/core": "^2.0.0",
"@stryker-mutator/html-reporter": "^2.0.0",
"@stryker-mutator/javascript-mutator": "^2.0.0",
"@stryker-mutator/jest-runner": "^2.0.0",
"eslint": "^4.19.1",

@@ -34,7 +38,3 @@ "eslint-config-standard": "^11.0.0",

"jest": "^24.8.0",
"pre-commit": "^1.2.2",
"@stryker-mutator/core": "^2.0.0",
"@stryker-mutator/html-reporter": "^2.0.0",
"@stryker-mutator/javascript-mutator": "^2.0.0",
"@stryker-mutator/jest-runner": "^2.0.0"
"pre-commit": "^1.2.2"
},

@@ -41,0 +41,0 @@ "jest": {

@@ -77,3 +77,3 @@ const assert = require('assert')

return defaultImplementation ? defaultImplementation() : undefined
return defaultImplementation ? defaultImplementation(...args) : undefined
})

@@ -80,0 +80,0 @@

@@ -487,2 +487,13 @@ const { stringContaining } = expect

it('has access to args in a default implementation', () => {
const fn = jest.fn()
when(fn)
.mockImplementation(({ name }) => `Hello ${name}`)
.calledWith({ name: 'bar' }).mockReturnValue('Goodbye bar')
expect(fn({ name: 'foo' })).toBe('Hello foo')
expect(fn({ name: 'bar' })).toBe('Goodbye bar')
})
it('keeps the default with a lot of matchers', () => {

@@ -489,0 +500,0 @@ const fn = jest.fn()

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