| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 49be13c commit 02ebde3
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,9 @@ | |||
| 1 | 1 | const path = require('node:path'); | |
| 2 | 2 | const url = require('node:url'); | |
| 3 | - const os = require('node:os'); | ||
| 4 | 3 | const fs = require('node:fs'); | |
| 4 | + const tmpdir = require('../../common/tmpdir'); | ||
| 5 | 5 | ||
| 6 | - const tmpfile = path.join(os.tmpdir(), 'file'); | ||
| 6 | + const tmpfile = path.join(tmpdir.path, 'file'); | ||
| 7 | 7 | fs.writeFileSync(tmpfile, ''); | |
| 8 | 8 | ||
| 9 | 9 | process.send({ 'watch:require': path.resolve(__filename) }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ import tmpdir from '../common/tmpdir.js'; | |||
| 5 | 5 | import path from 'node:path'; | |
| 6 | 6 | import assert from 'node:assert'; | |
| 7 | 7 | import process from 'node:process'; | |
| 8 | - import os from 'node:os'; | ||
| 9 | 8 | import { describe, it, beforeEach, afterEach } from 'node:test'; | |
| 10 | 9 | import { writeFileSync, mkdirSync } from 'node:fs'; | |
| 11 | 10 | import { setTimeout } from 'node:timers/promises'; | |
@@ -153,7 +152,7 @@ describe('watch mode file watcher', () => { | |||
| 153 | 152 | const child = spawn(process.execPath, [file], { stdio: ['pipe', 'pipe', 'pipe', 'ipc'], encoding: 'utf8' }); | |
| 154 | 153 | watcher.watchChildProcessModules(child); | |
| 155 | 154 | await once(child, 'exit'); | |
| 156 | - let expected = [file, path.join(os.tmpdir(), 'file')]; | ||
| 155 | + let expected = [file, path.join(tmpdir.path, 'file')]; | ||
| 157 | 156 | if (supportsRecursiveWatching) { | |
| 158 | 157 | expected = expected.map((file) => path.dirname(file)); | |
| 159 | 158 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments