feat: Add random endpoints to the SDK (#277)

This commit is contained in:
2024-10-17 22:52:19 +02:00
committed by GitHub
parent 54a4b729b3
commit e08fd98269
4 changed files with 39 additions and 12 deletions

View File

@ -138,3 +138,13 @@ for (const endpoint of endpoints) {
})
}
test(`random card/set/serie`, async () => {
const tcgdex = new TCGdex('en')
TCGdex.fetch = fetch
expect((await tcgdex.random.card())).toBeTruthy()
expect((await tcgdex.random.set())).toBeTruthy()
expect((await tcgdex.random.serie())).toBeTruthy()
})