Skip to content

Commit

Permalink
test: avoid potential race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Oct 2, 2021
1 parent 2a6cbda commit 79adad1
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 86 deletions.
12 changes: 8 additions & 4 deletions test/scripts/processors/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ describe('asset', () => {
asset.modified.should.be.true;
asset.renderable.should.be.false;

asset.remove();
unlink(file.source);
return Promise.all([
asset.remove(),
unlink(file.source)
]);
});

it('asset - type: create (when source path is configed to parent directory)', async () => {
Expand Down Expand Up @@ -136,8 +138,10 @@ describe('asset', () => {
asset.modified.should.be.true;
asset.renderable.should.be.false;

asset.remove();
unlink(file.source);
return Promise.all([
asset.remove(),
unlink(file.source)
]);
});

it('asset - type: skip', async () => {
Expand Down

0 comments on commit 79adad1

Please sign in to comment.