Skip to content

Commit 79fa953

Browse files
committed
test: add index init
1 parent f81a47e commit 79fa953

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const init = jest.fn()
2+
jest.mock('@DOSDelete/digitalOceanSpacesDelete.ts', () => ({
3+
__esModule: true, // this property makes it work
4+
default: init,
5+
}))
6+
7+
describe('DOSDelete index', () => {
8+
test('should call init', async () => {
9+
require('@DOSDelete/index.ts')
10+
expect(init).toHaveBeenCalledTimes(1)
11+
})
12+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const mockInit = jest.fn()
2+
jest.mock('@DOSUpload/digitalOceanSpacesUpload.ts', () => ({
3+
__esModule: true, // this property makes it work
4+
default: mockInit,
5+
}))
6+
7+
describe('DOSUpload index', () => {
8+
test('should call init', async () => {
9+
require('@DOSUpload/index.ts')
10+
expect(mockInit).toHaveBeenCalledTimes(1)
11+
})
12+
})

0 commit comments

Comments
 (0)