mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
test: replace jest with vitest (#10472)
* chore: vitest config * feat: vitest * fix: do not actually create ws * chore: config * chore: lockfile * chore: revert downgrade, up node * chore: package - 'git add -A' * chore: delete mock-socket * chore: delete mock-socket * fix: lockfile --------- Co-authored-by: almeidx <github@almeidx.dev> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { test, expect, vitest } from 'vitest';
|
||||
import { methods } from '../src/util/Secretbox';
|
||||
|
||||
jest.mock('tweetnacl');
|
||||
vitest.mock('tweetnacl');
|
||||
|
||||
test('Does not throw error with a package installed', () => {
|
||||
// @ts-expect-error: Unknown type
|
||||
expect(() => methods.open()).not.toThrowError();
|
||||
// @ts-expect-error We are testing
|
||||
expect(() => methods.open()).toThrow(TypeError);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user