Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Yet Another Test Flake #1320

Merged
merged 8 commits into from
Feb 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/models/workdir-cache.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ describe('WorkdirCache', function() {
Array(6).fill(null, 0, 6).map(() => cloneRepository('three-files')),
);

await Promise.all(dirs.map(dir => cache.find(dir)));
const expectedDir = dirs[1];
await Promise.all(dirs.slice(0, 5).map(dir => cache.find(dir)));
await cache.find(dirs[5]);

const expectedDir = dirs[2];
sinon.spy(cache, 'revParse');
const actualDir = await cache.find(expectedDir);
assert.equal(actualDir, expectedDir);
assert.strictEqual(actualDir, expectedDir);
assert.isTrue(cache.revParse.called);
});
});