add initial macOS support #40

This commit is contained in:
undergroundwires
2021-01-13 16:31:20 +01:00
parent 2428de23ee
commit 8a8b7319d5
99 changed files with 2663 additions and 1135 deletions

View File

@@ -35,10 +35,10 @@ describe('AsyncLazy', () => {
expect(results).to.deep.equal([1, 1, 1, 1, 1]);
});
it('when running long-running task paralelly', async () => {
const sleep = (time: number) => new Promise(((resolve) => setTimeout(resolve, time)));
it('when running long-running task in parallel', async () => {
const sleepAsync = (time: number) => new Promise(((resolve) => setTimeout(resolve, time)));
const sut = new AsyncLazy(async () => {
await sleep(100);
await sleepAsync(100);
totalExecuted++;
return Promise.resolve(totalExecuted);
});