Created
September 16, 2018 12:12
-
-
Save entrptaher/51e6fffb0dea2aa25a22e0951d7425f1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const { expect } = require("chai"); | |
const PQueue = require("p-queue"); | |
const queue = new PQueue({ concurrency: 1 }); | |
const numbers = [1, 2, 3]; | |
describe("tests various numbers", async function() { | |
let realNumber = 0; | |
numbers.map(number => { | |
it(`number is equal to ${number}`, async function() { | |
await queue.add(async () => await ++realNumber); | |
expect(realNumber).to.equal(number); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment