Skip to content

Commit 9dfa634

Browse files
authored
test: use os.devNull (#1090)
1 parent a828b25 commit 9dfa634

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

test/bin/test-citgm-all.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { fileURLToPath } from 'url';
2+
import { devNull as nullDevice } from 'os';
23

34
import tap from 'tap';
45

@@ -11,7 +12,6 @@ const citgmAllPath = fileURLToPath(
1112
const { test } = tap;
1213

1314
const isWin32 = process.platform === 'win32';
14-
const nullDevice = isWin32 ? '\\\\.\\NUL' : '/dev/null';
1515

1616
test('citgm-all: /w markdown /w -j', (t) => {
1717
t.plan(1);

test/bin/test-citgm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { fileURLToPath } from 'url';
2+
import { devNull as nullDevice } from 'os';
23

34
import tap from 'tap';
45

@@ -9,7 +10,6 @@ const citgmPath = fileURLToPath(new URL('../../bin/citgm.js', import.meta.url));
910
const { test } = tap;
1011

1112
const isWin32 = process.platform === 'win32';
12-
const nullDevice = isWin32 ? '\\\\.\\NUL' : '/dev/null';
1313

1414
test('bin: omg-i-pass /w tap to file /w junit to file /w append', (t) => {
1515
t.plan(1);

test/test-temp-directory.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { promises as fs } from 'fs';
2+
import { devNull as nullDevice } from 'os';
23

34
import tap from 'tap';
45

56
import * as tempDirectory from '../lib/temp-directory.js';
67

78
const { test } = tap;
89

9-
const isWin32 = process.platform === 'win32';
10-
const nullDevice = isWin32 ? '\\\\.\\NUL' : '/dev/null';
11-
1210
const context = {
1311
path: null,
1412
emit: function () {},

0 commit comments

Comments
 (0)