Skip to content

Commit

Permalink
Added watch flag to tests, marked stop tests as 'todo'
Browse files Browse the repository at this point in the history
  • Loading branch information
mstarski committed Dec 9, 2021
1 parent 6e21542 commit a7abc77
Show file tree
Hide file tree
Showing 4 changed files with 986 additions and 20 deletions.
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
],
};
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"build": "tsc --project tsconfig.json",
"start": "tsc-watch --project tsconfig.json --onSuccess 'node dist/main.js'",
"test": "jest"
"test": "jest",
"test:watch": "jest --watch"
},
"dependencies": {
"@discordjs/rest": "^0.1.0-canary.0",
Expand All @@ -23,9 +24,13 @@
"ytdl-core-discord": "^1.3.1"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-typescript": "^7.16.0",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.6",
"@types/ramda": "^0.27.46",
"babel-jest": "^27.4.2",
"jest": "^27.3.1",
"prettier": "^2.4.1",
"ts-node": "^10.4.0",
Expand Down
10 changes: 2 additions & 8 deletions src/__test__/music-player.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ describe("Music player functionalities", () => {
});

describe("Stopping music", () => {
it.todo("should stop playing current song", async () => {
await musicPlayer.play(sampleSongLink);
await musicPlayer.stop();
});
it.todo("should stop playing current song");

it("should not dequeue current song", async () => {
await musicPlayer.play(sampleSongLink);
Expand All @@ -64,10 +61,7 @@ describe("Music player functionalities", () => {
});

describe("Skipping music", () => {
it.todo("should stop current song", async () => {
await musicPlayer.play(sampleSongLink);
await musicPlayer.skip();
});
it.todo("should stop current song");

it("should dequeue current song", async () => {
await musicPlayer.play(sampleSongLink);
Expand Down
Loading

0 comments on commit a7abc77

Please sign in to comment.