Skip to content

Commit

Permalink
Merge pull request #9 from iambumblehead/small-readme-change
Browse files Browse the repository at this point in the history
Small readme change
  • Loading branch information
iambumblehead authored Apr 21, 2021
2 parents d859066 + 7ddba57 commit a320ff6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import test from 'ava';
import esmock from 'esmock';

test('should mock modules and local files at same time', async t => {
const main = await esmock('./local/main.js', {
const main = await esmock('../src/main.js', {
stringifierpackage : o => JSON.stringify(o),
'./local/util.js' : {
'../src/util.js' : {
exportedFunction : () => 'foobar'
}
});
Expand All @@ -33,7 +33,7 @@ test('should mock modules and local files at same time', async t => {
});

test('should do global instance mocks —third parameter', async t => {
const { getFile } = await esmock('./local/main.js', {}, {
const { getFile } = await esmock('../src/main.js', {}, {
fs : {
readFileSync : () => {
return 'anywhere the instance uses fs readFileSync';
Expand All @@ -48,6 +48,8 @@ test('should do global instance mocks —third parameter', async t => {

### changelog

* 0.3.8 _Apr.21.2021_
* small change to README
* 0.3.7 _Apr.20.2021_
* add test, throw error if mocked module path is not found
* 0.3.6 _Apr.19.2021_
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esmock",
"version": "0.3.7",
"version": "0.3.8",
"license": "MIT",
"readmeFilename": "README.md",
"description": "mock esm modules for unit-tests",
Expand Down

0 comments on commit a320ff6

Please sign in to comment.