Files
discord.js/packages/voice/__tests__/Secretbox.test.ts
Almeida 01f31f374a chore: bump dependencies (#11356)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-12-10 17:53:48 +00:00

21 lines
606 B
TypeScript

import { Buffer } from 'node:buffer';
import { test, expect, vitest } from 'vitest';
import { methods, secretboxLoadPromise } from '../src/util/Secretbox';
vitest.mock('@noble/ciphers/chacha.js');
// 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();
});