-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38f7c85
commit 19ebbfb
Showing
6 changed files
with
100 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
describe("Queue", () => | ||
Expect.( | ||
describe("#SonosDecode", () => | ||
describe("#trackPosition", () => | ||
test("should handle track position", () => | ||
expect(Queue.trackPosition(~first="1", ~queueAt=1., ())) | ||
|> toEqual("1") | ||
) | ||
) | ||
describe("#SonosDecode", () => | ||
describe("#trackPosition", () => | ||
test("should handle track position", () => | ||
expect(Queue.trackPosition(~first="1", ~queueAt=1., ())) | ||
|> toEqual("1") | ||
) | ||
) | ||
); | ||
) | ||
describe("#handleRemoveArgs", () => { | ||
test("no args", () => { | ||
expect(Queue.handleRemoveArgs("")) | ||
|> toEqual((1, 1)) | ||
}) | ||
test("returns 1 param correctly", () => { | ||
expect(Queue.handleRemoveArgs("9")) | ||
|> toEqual((9, 1)) | ||
}) | ||
test("returns 2 params correctly", () => { | ||
expect(Queue.handleRemoveArgs("3 3")) | ||
|> toEqual((3, 3)) | ||
}) | ||
test("returns 2 params correctly even though you add more", () => { | ||
expect(Queue.handleRemoveArgs("3 3 jimmyärsnygg")) | ||
|> toEqual((3, 3)) | ||
}) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
[@bs.send] external removeMultipleTracks: (Sonos.Methods.sonosDevice, int, int) => Js.Promise.t('a) = "removeTracksFromQueue"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters