style: make any node build-in modules explicitly imported first
This commit is contained in:
parent
2e5652d84b
commit
57578e9398
|
@ -13,7 +13,8 @@
|
|||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import { loadFile, template } from 'presetter';
|
||||
|
||||
import { getRollupParameter } from './rollup';
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import { readdirSync } from 'fs';
|
||||
import { resolve } from 'path';
|
||||
import { readdirSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import { loadDynamicMap, resolveContext } from 'presetter';
|
||||
|
||||
import getPresetAsset from '#index';
|
||||
|
||||
jest.mock('path', () => ({
|
||||
jest.mock('node:path', () => ({
|
||||
__esModule: true,
|
||||
...jest.requireActual('path'),
|
||||
resolve: jest.fn(jest.requireActual('path').resolve),
|
||||
...jest.requireActual('node:path'),
|
||||
resolve: jest.fn(jest.requireActual('node:path').resolve),
|
||||
}));
|
||||
|
||||
describe('fn:getPresetAsset', () => {
|
||||
|
|
Loading…
Reference in New Issue