Skip to content

Commit 0fa96c1

Browse files
renovate[bot]QuiiBz
andauthored
chore(devdeps): update dependency @testing-library/jest-dom to v6 (#1483)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: QuiiBz <[email protected]>
1 parent 63d7118 commit 0fa96c1

File tree

28 files changed

+100
-121
lines changed

28 files changed

+100
-121
lines changed

.eslintrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"root": true,
33
"env": {
4-
"browser": true,
5-
"jest": true
4+
"browser": true
65
},
76
"overrides": [
87
{
@@ -30,6 +29,15 @@
3029
"rules": {
3130
"no-console": "off"
3231
}
32+
},
33+
{
34+
"files": [
35+
"packages/jest-helpers/**/*.ts{x,}",
36+
"**/__tests__/**/*.ts{x,}"
37+
],
38+
"rules": {
39+
"import/no-extraneous-dependencies": "off"
40+
}
3341
}
3442
]
3543
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
"@changesets/cli": "2.26.2",
2222
"@commitlint/cli": "17.7.1",
2323
"@commitlint/config-conventional": "17.7.0",
24+
"@jest/globals": "^29.6.4",
2425
"@rollup/plugin-babel": "6.0.3",
2526
"@rollup/plugin-node-resolve": "15.2.1",
2627
"@scaleway/eslint-config-react": "workspace:*",
2728
"@scaleway/tsconfig": "workspace:*",
28-
"@testing-library/jest-dom": "5.17.0",
29+
"@testing-library/jest-dom": "6.0.1",
2930
"@testing-library/react": "13.4.0",
3031
"@tsd/typescript": "5.1.6",
31-
"@types/jest": "29.5.4",
3232
"@types/node": "18.17.9",
3333
"@types/prop-types": "15.7.5",
3434
"@types/react": "18.2.21",

packages/changesets-renovate/src/__tests__/generate-changeset.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'
12
import fs from 'node:fs/promises'
23
import { simpleGit } from 'simple-git'
34
import { run } from '..'
@@ -95,9 +96,9 @@ describe('generate changeset file', () => {
9596
})
9697

9798
fs.readFile = jest
98-
.fn()
99+
.fn<any>()
99100
.mockResolvedValue(`{"name":"packageName","version":"1.0.0"}`)
100-
fs.writeFile = jest.fn()
101+
fs.writeFile = jest.fn<any>()
101102

102103
await run()
103104

@@ -129,9 +130,9 @@ describe('generate changeset file', () => {
129130
})
130131

131132
fs.readFile = jest
132-
.fn()
133+
.fn<any>()
133134
.mockResolvedValue(`{"name":"packageName","workspaces":[]}`)
134-
fs.writeFile = jest.fn()
135+
fs.writeFile = jest.fn<any>()
135136

136137
await run()
137138

@@ -159,8 +160,8 @@ describe('generate changeset file', () => {
159160
`,
160161
})
161162

162-
fs.readFile = jest.fn().mockResolvedValue(`{"name":"packageName"}`)
163-
fs.writeFile = jest.fn()
163+
fs.readFile = jest.fn<any>().mockResolvedValue(`{"name":"packageName"}`)
164+
fs.writeFile = jest.fn<any>()
164165

165166
await run()
166167

packages/jest-helpers/src/__tests__/index.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { beforeAll, describe, expect, it, jest, test } from '@jest/globals'
12
import makeHelpers from '..'
23
import type { RenderWithThemeFn } from '../helpers/renderWithTheme'
34
import type { ShouldMatchEmotionSnapshotFn } from '../helpers/shouldMatchEmotionSnapshot'
@@ -31,7 +32,7 @@ describe('@jest-helpers', () => {
3132
})
3233

3334
test('should call tranform with shouldMatchEmotionSnapshot', async () => {
34-
const transform = jest.fn()
35+
const transform = jest.fn<any>()
3536
await shouldMatchEmotionSnapshot(<div id="test" />, { transform })
3637

3738
expect(transform).toHaveBeenCalledTimes(1)
@@ -42,7 +43,7 @@ describe('@jest-helpers', () => {
4243
})
4344

4445
it('should call transform with shouldMatchEmotionSnapshot', async () => {
45-
const transform = jest.fn()
46+
const transform = jest.fn<any>()
4647
await shouldMatchEmotionSnapshotWithPortal(<div id="test" />, { transform })
4748

4849
expect(transform).toHaveBeenCalledTimes(1)

packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { expect } from '@jest/globals'
12
import type { RenderOptions, render } from '@testing-library/react'
23
import type { ReactNode } from 'react'
34
import type { RenderWithThemeFn } from './renderWithTheme'

packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { expect, jest } from '@jest/globals'
12
import type { RenderOptions, render } from '@testing-library/react'
23
import type { ReactNode } from 'react'
34
import type { RenderWithThemeFn } from './renderWithTheme'

packages/jest-helpers/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { CreateSerializerOptions } from '@emotion/jest'
22
import { createSerializer } from '@emotion/jest'
3+
import { expect } from '@jest/globals'
34
import type { FC, ReactNode } from 'react'
45
import type { RenderWithThemeFn } from './helpers/renderWithTheme'
56
import makeRenderWithTheme from './helpers/renderWithTheme'

packages/outdated-browser/src/__tests__/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { afterEach, beforeAll, describe, expect, jest, test } from '@jest/globals'
2+
13
/**
24
* @jest-environment jsdom
35
*/

packages/random-name/src/__tests__/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, it } from '@jest/globals'
12
import randomName from '..'
23

34
describe('randomName', () => {

packages/regex/src/__tests__/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, test } from '@jest/globals'
12
import {
23
absoluteLinuxPath,
34
accessKeyRegex,

0 commit comments

Comments
 (0)