Skip to content

Commit 6beb2be

Browse files
authored
jestvitest (#4657)
1 parent 11258ec commit 6beb2be

File tree

199 files changed

+4075
-6093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+4075
-6093
lines changed

catalog/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ where verb is one of
1818

1919
## Changes
2020

21+
- [Changed] Migrate test framework from Jest to Vitest with improved performance ([#4657](https://github.com/quiltdata/quilt/pull/4657))
2122
- [Changed] Add `crc64Checksums` config property indicating CRC64/NVMe checksums are enabled ([#4632](https://github.com/quiltdata/quilt/pull/4632))
2223
- [Changed] Remove outdated `chunkedChecksums` config property, and remove related dead code ([#4632](https://github.com/quiltdata/quilt/pull/4632))
2324
- [Fixed] Prevent package download form from being prematurely removed from DOM ([#4634](https://github.com/quiltdata/quilt/pull/4634))

catalog/app/components/Assistant/Model/GlobalContext/__snapshots__/navigation.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produced JSON Schema should match the snapshot 1`] = `
3+
exports[`components/Assistant/Model/GlobalTools/navigation > NavigateSchema > produced JSON Schema > should match the snapshot 1`] = `
44
{
55
"$defs": {
66
"BooleanPredicateState": {

catalog/app/components/Assistant/Model/GlobalContext/navigation.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import * as Eff from 'effect'
2+
import { describe, it, expect, vi } from 'vitest'
23

34
import { makeJSONSchema } from '../Tool'
45

56
import * as nav from './navigation'
67

7-
jest.mock(
8-
'constants/config',
9-
jest.fn(() => ({})),
10-
)
8+
vi.mock('constants/config', () => ({ default: {} }))
119

1210
describe('components/Assistant/Model/GlobalTools/navigation', () => {
1311
describe('NavigateSchema', () => {

catalog/app/components/BreadCrumbs/BreadCrumbs.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
22
import { render } from '@testing-library/react'
33
import { MemoryRouter } from 'react-router-dom'
4+
import { describe, it, expect } from 'vitest'
45

56
import * as BreadCrumbs from './'
67

catalog/app/components/BreadCrumbs/__snapshots__/BreadCrumbs.spec.tsx.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`components/BreadCrumbs Segment should render EMPTY 1`] = `
3+
exports[`components/BreadCrumbs > Segment > should render EMPTY 1`] = `
44
<div>
55
<i>
66
&lt;EMPTY&gt;
77
</i>
88
</div>
99
`;
1010

11-
exports[`components/BreadCrumbs Segment should render label 1`] = `
11+
exports[`components/BreadCrumbs > Segment > should render label 1`] = `
1212
<div>
1313
Lorem ipsum
1414
</div>
1515
`;
1616

17-
exports[`components/BreadCrumbs Segment should render link 1`] = `
17+
exports[`components/BreadCrumbs > Segment > should render link 1`] = `
1818
<div>
1919
<a
2020
class="makeStyles-root-1"
@@ -25,7 +25,7 @@ exports[`components/BreadCrumbs Segment should render link 1`] = `
2525
</div>
2626
`;
2727

28-
exports[`components/BreadCrumbs render and end with separator 1`] = `
28+
exports[`components/BreadCrumbs > render > and end with separator 1`] = `
2929
<div>
3030
<a
3131
class="makeStyles-root-5"
@@ -51,7 +51,7 @@ exports[`components/BreadCrumbs render and end with separator 1`] = `
5151
</div>
5252
`;
5353

54-
exports[`components/BreadCrumbs render and make links for every crumb 1`] = `
54+
exports[`components/BreadCrumbs > render > and make links for every crumb 1`] = `
5555
<div>
5656
<a
5757
class="makeStyles-root-4"
@@ -76,7 +76,7 @@ exports[`components/BreadCrumbs render and make links for every crumb 1`] = `
7676
</div>
7777
`;
7878

79-
exports[`components/BreadCrumbs render and transform links 1`] = `
79+
exports[`components/BreadCrumbs > render > and transform links 1`] = `
8080
<div>
8181
<a
8282
class="makeStyles-root-3"
@@ -96,7 +96,7 @@ exports[`components/BreadCrumbs render and transform links 1`] = `
9696
</div>
9797
`;
9898

99-
exports[`components/BreadCrumbs render basic breadcrumbs 1`] = `
99+
exports[`components/BreadCrumbs > render > basic breadcrumbs 1`] = `
100100
<div>
101101
<a
102102
class="makeStyles-root-2"
@@ -130,7 +130,7 @@ exports[`components/BreadCrumbs render basic breadcrumbs 1`] = `
130130
</div>
131131
`;
132132

133-
exports[`components/BreadCrumbs render without root label 1`] = `
133+
exports[`components/BreadCrumbs > render > without root label 1`] = `
134134
<div>
135135
<a
136136
class="makeStyles-root-6"

catalog/app/components/BucketIcon/BucketIcon.spec.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import * as React from 'react'
22
import { render } from '@testing-library/react'
3+
import { describe, expect, it, vi } from 'vitest'
4+
5+
vi.mock('./bucket.svg', () => ({ default: 'IMAGE_MOCK' }))
36

47
import BucketIcon from './'
58

catalog/app/components/BucketIcon/__snapshots__/BucketIcon.spec.tsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`components/BucketIcon class names should apply \`\` className if src is set 1`] = `
3+
exports[`components/BucketIcon > class names > should apply \`\` className if src is set 1`] = `
44
<img
55
alt="Custom className"
66
class="makeStyles-root-4 C A"
77
src="https://custom-src"
88
/>
99
`;
1010

11-
exports[`components/BucketIcon class names should apply \`stub\` className if no src 1`] = `
11+
exports[`components/BucketIcon > class names > should apply \`stub\` className if no src 1`] = `
1212
<img
1313
alt="Stub className"
1414
class="makeStyles-root-5 S A"
1515
src="IMAGE_MOCK"
1616
/>
1717
`;
1818

19-
exports[`components/BucketIcon class names should apply className 1`] = `
19+
exports[`components/BucketIcon > class names > should apply className 1`] = `
2020
<img
2121
alt="Set className"
2222
class="makeStyles-root-3 A"
2323
src="https://custom-src"
2424
/>
2525
`;
2626

27-
exports[`components/BucketIcon should render custom src 1`] = `
27+
exports[`components/BucketIcon > should render custom src 1`] = `
2828
<img
2929
alt="Custom src"
3030
class="makeStyles-root-2"
3131
src="https://custom-src"
3232
/>
3333
`;
3434

35-
exports[`components/BucketIcon should render default when no src 1`] = `
35+
exports[`components/BucketIcon > should render default when no src 1`] = `
3636
<img
3737
alt="No src"
3838
class="makeStyles-root-1"

catalog/app/components/Buttons/Iconized.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
22
import { render } from '@testing-library/react'
33
import * as Icons from '@material-ui/icons'
4+
import { describe, it, expect } from 'vitest'
45

56
import * as Buttons from './'
67

catalog/app/components/Buttons/Skeleton.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react'
22
import { render } from '@testing-library/react'
3+
import { describe, it, expect } from 'vitest'
34

45
import * as Buttons from './'
56

catalog/app/components/Buttons/WithPopover.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
22
import { render, fireEvent, screen } from '@testing-library/react'
33
import * as Icons from '@material-ui/icons'
4+
import { describe, it, expect } from 'vitest'
45

56
import WithPopover from './WithPopover'
67

0 commit comments

Comments
 (0)