Skip to content

Commit a455669

Browse files
author
Szymon.Poltorak
committed
refactor(testing): replace logger with console.warn in test folder teardown utility
1 parent 307217d commit a455669

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

testing/test-utils/src/lib/utils/test-folder-setup.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { logger } from '@nx/devkit';
21
import { bold } from 'ansis';
32
import { mkdir, rm, stat } from 'node:fs/promises';
43

@@ -11,7 +10,7 @@ export async function teardownTestFolder(dirName: string) {
1110
try {
1211
const stats = await stat(dirName);
1312
if (!stats.isDirectory()) {
14-
logger.warn(
13+
console.warn(
1514
`⚠️ You are trying to delete a file instead of a directory - ${bold(
1615
dirName,
1716
)}.`,
@@ -30,7 +29,7 @@ export async function teardownTestFolder(dirName: string) {
3029
retryDelay: 100,
3130
});
3231
} catch {
33-
logger.warn(
32+
console.warn(
3433
`⚠️ Failed to delete test artefact ${bold(
3534
dirName,
3635
)} so the folder is still in the file system!\nIt may require a deletion before running e2e tests again.`,

0 commit comments

Comments
 (0)