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

esmock

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esmock - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

2

package.json
{
"name": "esmock",
"version": "1.6.0",
"version": "1.6.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "readmeFilename": "README.md",

@@ -7,4 +7,3 @@ esmock

[10]: https://github.com/iambumblehead/esmock/wiki/How-to-use-esmock
[10]: https://github.com/iambumblehead/esmock/wiki
[0]: http://www.bumblehead.com "bumblehead"

@@ -31,4 +30,4 @@ [1]: https://github.com/iambumblehead/esmock/workflows/nodejs-ci/badge.svg "nodejs-ci pipeline"

await esmock(
'./to/module.js', // path to the target module being tested
{ ...childmocks }, // mocked definitions imported by the target module
'./to/module.js', // path to target module being tested
{ ...childmocks }, // mocked definitions imported by target module
{ ...globalmocks } // mocked definitions imported everywhere else

@@ -71,8 +70,8 @@ );

test('should mock "await import()" using esmock.p', async t => {
// when esmock.p is used, mock definitions are not deleted from cache
const doAwaitImport = await esmock.p('../src/awaitImportEslint.mjs', {
// using esmock.p, mock definitions are not deleted from cache
const doAwaitImport = await esmock.p('../src/awaitImportLint.js', {
eslint : { ESLint : config => config }
});
// the cached definition is there when import is called
// cached mock definition is there when import is called
t.is(await doAwaitImport('config'), 'config');

@@ -89,2 +88,6 @@

* 1.6.1 _Dec.03.2021_
* adds test verifying deep stacktrace has small path file:///
* resolve bug, '--loader=esmoc' not-found error not thrown
* small README edits, update link to wiki (use Home as default)
* 1.6.0 _Dec.02.2021_

@@ -91,0 +94,0 @@ * reduce file url length (improve readability of stacktrace)

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