Skip to content

Commit 0c0fe61

Browse files
committed
test(core): Switch to vitest
5x speed improvement!
1 parent 615c670 commit 0c0fe61

Some content is hidden

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

55 files changed

+504
-430
lines changed

packages/core/jest.config.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
"clean": "rimraf build coverage sentry-core-*.tgz",
5959
"fix": "eslint . --format stylish --fix",
6060
"lint": "eslint . --format stylish",
61-
"test": "jest",
62-
"test:watch": "jest --watch",
61+
"test": "vitest run",
62+
"test:watch": "vitest --watch",
6363
"yalc:publish": "yalc publish --push --sig"
6464
},
6565
"volta": {

packages/core/test/lib/api.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { DsnComponents, SdkInfo } from '@sentry/types';
22
import { makeDsn } from '@sentry/utils';
33

4+
import { describe, expect, it, test } from 'vitest';
45
import { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from '../../src/api';
56

67
const ingestDsn = 'https://[email protected]:1234/subpath/123';

packages/core/test/lib/attachments.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { parseEnvelope } from '@sentry/utils';
22

3+
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
34
import { createTransport } from '../../src/transports/base';
45
import { TestClient, getDefaultTestClientOptions } from '../mocks/client';
56

@@ -10,7 +11,7 @@ describe('Attachments', () => {
1011
});
1112

1213
afterEach(() => {
13-
jest.clearAllMocks();
14+
vi.clearAllMocks();
1415
});
1516

1617
test('actually end up in envelope', async () => {

0 commit comments

Comments
 (0)