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

testdouble

Package Overview
Dependencies
Maintainers
2
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testdouble - npm Package Compare versions

Comparing version 3.16.0 to 3.16.1

8

CHANGELOG.md
# Change Log
## 3.15
## 3.16.0
* Add new `td.instance()` method which is a one-liner of `FakeFoo = td.constructor(Foo); new FakeFoo()` [#448](https://github.com/testdouble/testdouble.js/pull/448)
## 3.15.0
* Add support for faking native ES modules with `td.replaceEsm()` [#445](https://github.com/testdouble/testdouble.js/pull/445)
## 3.14
## 3.14.0

@@ -9,0 +13,0 @@ * Type updates [#437](https://github.com/testdouble/testdouble.js/pull/437)

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = '3.16.0';
exports.default = '3.16.1';
{
"name": "testdouble",
"version": "3.16.0",
"version": "3.16.1",
"description": "A minimal test double library for TDD with JavaScript",

@@ -97,3 +97,3 @@ "homepage": "https://github.com/testdouble/testdouble.js",

"lodash": "^4.17.15",
"quibble": "^0.6.3",
"quibble": "^0.6.4",
"stringify-object-es5": "^2.5.0",

@@ -100,0 +100,0 @@ "theredoc": "^1.0.0"

@@ -337,12 +337,10 @@ # testdouble.js (AKA td.js)

If your code depends on ES classes or functions, then the `td.instance()` function
will create a mock constructor and return a new instance of that mock constructor.
As a shorthand convenience, `td.instance()` function will call
`td.constructor()` and return a `new` instance of the fake constructor function
it returns.
The following code snippets are functionally equiavalent:
The following code snippets are functionally equivalent:
```js
const fakeObject = td.instance(RealConstructor)
td.when(fakeObject.doStuff()).thenReturn('just did it')
fakeObject.doStuff() // returns "just did it"
```

@@ -353,5 +351,2 @@

const fakeObject = new FakeConstructor()
td.when(fakeObject.doStuff()).thenReturn('just did it')
fakeObject.doStuff() // returns "just did it"
```

@@ -358,0 +353,0 @@

@@ -1,1 +0,1 @@

export default '3.16.0'
export default '3.16.1'

Sorry, the diff of this file is too big to display

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