Skip to content

Commit 3954bb8

Browse files
authored
Merge pull request #373 from dscho/bump-jest-to-v28
Bump jest to v28
2 parents e605d63 + defe062 commit 3954bb8

File tree

4 files changed

+10667
-5672
lines changed

4 files changed

+10667
-5672
lines changed

__tests__/downloader.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fetch from 'node-fetch'
22
import {get} from '../src/downloader'
3-
import {mocked} from 'ts-jest/utils'
43

54
const buildIdResponse = {
65
count: 1,
@@ -45,9 +44,11 @@ jest.mock('node-fetch')
4544
const {Response} = jest.requireActual('node-fetch')
4645

4746
test('can obtain build ID', async () => {
48-
mocked(fetch).mockReturnValue(
49-
Promise.resolve(new Response(JSON.stringify(buildIdResponse)))
50-
)
47+
jest
48+
.mocked(fetch)
49+
.mockReturnValue(
50+
Promise.resolve(new Response(JSON.stringify(buildIdResponse)))
51+
)
5152
const {id} = await get('minimal', 'x86_64')
5253
expect(fetch).toHaveBeenCalledTimes(1)
5354
expect(id).toEqual('git-sdk-64-minimal-71000')

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)