mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 13:09:26 +00:00
Use node prefix for build-in modules (#3340)
It is basically a cosmetic thing, but has the following advantages: 1. Consistency with the official node documentation. The prefix is used there. 2. It is easier to recognize the build-in modules.
This commit is contained in:
committed by
GitHub
parent
407072d12d
commit
4bbd35fa6a
@@ -1,4 +1,4 @@
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const { JSDOM } = require("jsdom");
|
||||
|
||||
describe("Test function cmpVersions in js/module.js", () => {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
jest.mock("util", () => ({
|
||||
jest.mock("node:util", () => ({
|
||||
...jest.requireActual("util"),
|
||||
promisify: jest.fn()
|
||||
}));
|
||||
|
||||
jest.mock("fs", () => ({
|
||||
jest.mock("node:fs", () => ({
|
||||
...jest.requireActual("fs"),
|
||||
statSync: jest.fn()
|
||||
}));
|
||||
@@ -29,7 +29,7 @@ describe("Updatenotification", () => {
|
||||
let gitTagListOut;
|
||||
|
||||
beforeAll(async () => {
|
||||
const { promisify } = require("util");
|
||||
const { promisify } = require("node:util");
|
||||
promisify.mockReturnValue(execMock);
|
||||
|
||||
const GitHelper = require("../../../modules/default/updatenotification/git_helper");
|
||||
|
Reference in New Issue
Block a user