Added search suggestion testing
This commit is contained in:
parent
4f9cfddeb0
commit
b6ae7d90a5
|
|
@ -173,8 +173,20 @@ const ytmusic = new YTMusic()
|
||||||
|
|
||||||
beforeAll(() => ytmusic.initialize())
|
beforeAll(() => ytmusic.initialize())
|
||||||
|
|
||||||
|
beforeEach(() => jest.setTimeout(10_000))
|
||||||
|
|
||||||
queries.forEach(query => {
|
queries.forEach(query => {
|
||||||
describe("Query: " + query, () => {
|
describe("Query: " + query, () => {
|
||||||
|
test("Search suggestions", done => {
|
||||||
|
ytmusic
|
||||||
|
.getSearchSuggestions(query)
|
||||||
|
.then(suggestions => {
|
||||||
|
_expect(suggestions, LIST(STRING()))
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(done)
|
||||||
|
})
|
||||||
|
|
||||||
test("Search Songs", done => {
|
test("Search Songs", done => {
|
||||||
ytmusic
|
ytmusic
|
||||||
.search(query, "SONG")
|
.search(query, "SONG")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue