Files
discord.js/packages/voice/__tests__/Secretbox.test.ts
Jiralite 9b8b0f828c build: Properly add typecheck tests (#10722)
* build: exclude type tests from running

* refactor: use `tsc`

* test: fix broker test

* test: fix voice test

* test: fix builders test

* test: use vitest typecheck

remove unused test scripts
skip lib check
rm vitest.d.ts

* fix: remove tsd from core and ws

* fix: extend local tsconfig

---------

Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-01-26 14:28:45 +00:00

20 lines
565 B
TypeScript

import { test, expect, vitest } from 'vitest';
import { methods, secretboxLoadPromise } from '../src/util/Secretbox';
vitest.mock('@noble/ciphers/chacha');
// TODO: what is this even testing exactly?
test.skip('Does not throw error with a package installed', async () => {
// The async loop in Secretbox will not have finished importing unless we wait
await secretboxLoadPromise;
expect(() =>
methods.crypto_aead_xchacha20poly1305_ietf_decrypt(
Buffer.from(''),
Buffer.from(''),
Buffer.from(''),
Buffer.from(''),
),
).not.toThrowError();
});