style: cleanup tests and tsup configs

This commit is contained in:
iCrawl
2022-06-04 15:21:57 +02:00
parent a45bef4cad
commit 6b8ef20cb3
26 changed files with 310 additions and 306 deletions

View File

@@ -21,7 +21,7 @@ describe('entersState', () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
process.nextTick(() => vc.emit(VoiceConnectionStatus.Ready, null as any, null as any));
const result = await entersState(vc, VoiceConnectionStatus.Ready, 1000);
expect(result).toBe(vc);
expect(result).toEqual(vc);
});
test('Rejects once the timeout is exceeded', async () => {
@@ -38,7 +38,7 @@ describe('entersState', () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
process.nextTick(() => vc.emit(VoiceConnectionStatus.Ready, null as any, null as any));
const result = await entersState(vc, VoiceConnectionStatus.Ready, ac.signal);
expect(result).toBe(vc);
expect(result).toEqual(vc);
});
test('Rejects once the signal is aborted', async () => {
@@ -51,6 +51,6 @@ describe('entersState', () => {
test('Resolves immediately when target already in desired state', async () => {
const vc = createFakeVoiceConnection();
await expect(entersState(vc, VoiceConnectionStatus.Signalling, 1000)).resolves.toBe(vc);
await expect(entersState(vc, VoiceConnectionStatus.Signalling, 1000)).resolves.toEqual(vc);
});
});