Skip to content

Commit

Permalink
Revert "Enrich the docs when it comes to types"
Browse files Browse the repository at this point in the history
  • Loading branch information
iambumblehead authored Nov 10, 2023
1 parent ac2af97 commit 7b1af27
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ test('full import tree mocks —third param', async () => {
assert.equal(getFile(), 'returned to 🌲 every caller in the tree')
})

test('allows you to specify the type of returned exports', async () => {
const { multiplyNumbers } = await esmock<typeof import('../src/utils.js')>(
'../src/utils.js', {
multiplyNumbers: (numbers: number[]): number => numbers.reduce((acc, current) => acc *= current, 1),
})

assert.equal(multiplyNumbers([1, 2, 3]), 6)
})

test('mock fetch, Date, setTimeout and any globals', async () => {
// https://github.com/iambumblehead/esmock/wiki#call-esmock-globals
const { userCount } = await esmock('../Users.js', {
Expand Down

0 comments on commit 7b1af27

Please sign in to comment.