Skip to content

Commit

Permalink
Update v2-addon-dev-watch-test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx authored Dec 14, 2024
1 parent 49ffed0 commit d98c1fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/scenarios/v2-addon-dev-watch-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,9 @@ Scenarios.fromProject(() => baseV2Addon())
// to guess for how long it'll take for the file system to update our file.
//
// the `stat` is measured in `ms`, so it's still pretty fast
await Promise.all([
fs.rm(path.join(addon.dir, 'src/components/demo.js')),
fs.rm(path.join(addon.dir, 'src/components/demo.hbs')),
]);

void fs.rm(path.join(addon.dir, 'src/components/demo.js'));
void fs.rm(path.join(addon.dir, 'src/components/demo.hbs'));
await aBit(150);
await watcher?.nextBuild();
await aBit(150);
Expand Down Expand Up @@ -405,5 +404,5 @@ Scenarios.fromProject(() => baseV2Addon())
});

function aBit(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
return new Promise(resolve => setTimeout(resolve, ms * 0));
}

0 comments on commit d98c1fb

Please sign in to comment.