mirror of
https://github.com/denoland/deno.git
synced 2025-01-18 11:53:59 -05:00
chore(cli/tests): fix flaky fs watcher tests (#12385)
On OS X, the watcher sometimes witnesses the creation of it's own root directory. Creating that directory using a sync op instead of an async op sidesteps the issue.
This commit is contained in:
parent
22d6e43c37
commit
62f43030b4
1 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ async function getTwoEvents(
|
||||||
unitTest(
|
unitTest(
|
||||||
{ permissions: { read: true, write: true } },
|
{ permissions: { read: true, write: true } },
|
||||||
async function watchFsBasic() {
|
async function watchFsBasic() {
|
||||||
const testDir = await Deno.makeTempDir();
|
const testDir = Deno.makeTempDirSync();
|
||||||
const iter = Deno.watchFs(testDir);
|
const iter = Deno.watchFs(testDir);
|
||||||
|
|
||||||
// Asynchornously capture two fs events.
|
// Asynchornously capture two fs events.
|
||||||
|
@ -66,7 +66,7 @@ unitTest(
|
||||||
unitTest(
|
unitTest(
|
||||||
{ permissions: { read: true, write: true } },
|
{ permissions: { read: true, write: true } },
|
||||||
async function watchFsReturn() {
|
async function watchFsReturn() {
|
||||||
const testDir = await Deno.makeTempDir();
|
const testDir = Deno.makeTempDirSync();
|
||||||
const iter = Deno.watchFs(testDir);
|
const iter = Deno.watchFs(testDir);
|
||||||
|
|
||||||
// Asynchronously loop events.
|
// Asynchronously loop events.
|
||||||
|
@ -84,7 +84,7 @@ unitTest(
|
||||||
unitTest(
|
unitTest(
|
||||||
{ permissions: { read: true, write: true } },
|
{ permissions: { read: true, write: true } },
|
||||||
async function watchFsClose() {
|
async function watchFsClose() {
|
||||||
const testDir = await Deno.makeTempDir();
|
const testDir = Deno.makeTempDirSync();
|
||||||
const iter = Deno.watchFs(testDir);
|
const iter = Deno.watchFs(testDir);
|
||||||
|
|
||||||
// Asynchronously loop events.
|
// Asynchronously loop events.
|
||||||
|
|
Loading…
Add table
Reference in a new issue