Skip to content

Commit 6522286

Browse files
committed
use context.mock injected global instead of explicit mock import
1 parent 5877144 commit 6522286

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native-node-api-modules/src/node/path-utils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import assert from "node:assert/strict";
2-
import { describe, it, mock as themock } from "node:test";
2+
import { describe, it } from "node:test";
33
import path from "node:path";
44
import fs from "node:fs";
55

@@ -301,7 +301,7 @@ describe("determineModuleContext", () => {
301301
});
302302
let readCount = 0;
303303
const orig = fs.readFileSync;
304-
themock.method(fs, "readFileSync", (...args: Parameters<typeof fs.readFileSync>) => {
304+
context.mock.method(fs, "readFileSync", (...args: Parameters<typeof fs.readFileSync>) => {
305305
const [pathArg] = args;
306306
if (typeof pathArg === "string" && pathArg.endsWith("package.json")) {
307307
readCount++;

0 commit comments

Comments
 (0)