Skip to content

Commit

Permalink
test: remove old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skick1234 committed Jun 3, 2024
1 parent f4d2a10 commit eef39c6
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 988 deletions.
149 changes: 0 additions & 149 deletions tests/DisTube.test.ts

This file was deleted.

33 changes: 0 additions & 33 deletions tests/__mocks__/Queue.ts

This file was deleted.

17 changes: 0 additions & 17 deletions tests/core/DisTubeOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { Options, defaultOptions } from "@";

test("Default DisTubeOptions", () => {
expect(new Options({})).toEqual({
directLink: true,
emitAddListWhenCreatingQueue: true,
emitAddSongWhenCreatingQueue: true,
emitNewSongOnly: false,
emptyCooldown: 60,
ffmpeg: {
args: {
global: {},
Expand All @@ -16,23 +14,14 @@ test("Default DisTubeOptions", () => {
path: "ffmpeg",
},
joinNewVoiceChannel: true,
leaveOnEmpty: true,
leaveOnFinish: false,
leaveOnStop: true,
nsfw: false,
plugins: [],
savePreviousSongs: true,
searchCooldown: 60,
searchSongs: 0,
streamType: 0,
ytdlOptions: {},
});
});

const typeOfOption = (option: string) => {
switch (option) {
case "streamType":
return "StreamType";
case "plugins":
return "Array<Plugin>";
default:
Expand All @@ -51,13 +40,7 @@ test("Validate DisTubeOptions", () => {
new Options(options);
}).toThrow(`Expected '${typeOfOption(option)}' for 'DisTubeOptions.${option}', but got NaN`);
}
expect(() => {
new Options({ youtubeCookie: 1 as any });
}).toThrow("Expected 'Array<Cookie>' or 'string' for 'DisTubeOptions.youtubeCookie', but got 1 (number)");
expect(() => {
new Options({ invalidKey: "an invalid key" } as any);
}).toThrow("'invalidKey' does not need to be provided in DisTubeOptions");
expect(() => {
new Options({ streamType: 2 });
}).toThrow("Expected 'StreamType' for 'DisTubeOptions.streamType', but got 2");
});
33 changes: 0 additions & 33 deletions tests/core/DisTubeStream.test.ts

This file was deleted.

Loading

0 comments on commit eef39c6

Please sign in to comment.