fix(slp integration tests): Adding delay to fix the BVT

This commit is contained in:
Chris Troutner
2020-04-20 08:08:47 -07:00
parent c9cb830fbb
commit cc79e21eb9
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -22,6 +22,11 @@ describe(`#SLP`, () => {
// console.log(`bchjs.SLP.apiToken: ${bchjs.SLP.apiToken}`)
// })
beforeEach(async () => {
// Introduce a delay so that the BVT doesn't trip the rate limits.
await sleep(1000)
})
describe("#util", () => {
describe("#list", () => {
it(`should get information on the Spice token`, async () => {
@@ -454,3 +459,8 @@ describe(`#SLP`, () => {
})
})
})
// Promise-based sleep function
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
+5
View File
@@ -23,6 +23,11 @@ util.inspect.defaultOptions = {
}
describe(`#SLP`, () => {
beforeEach(async () => {
// Introduce a delay so that the BVT doesn't trip the rate limits.
await sleep(1000)
})
describe("#util", () => {
it(`should get information on the Oasis token`, async () => {
const tokenId = `a371e9934c7695d08a5eb7f31d3bceb4f3644860cc67520cda1e149423b9ec39`