From 878609e2fb3bd05a53e1c9c9fa02d090eb83d528 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 24 Dec 2024 21:00:22 +0800 Subject: [PATCH] f --- test/framework.test.ts | 4 ++-- test/plugin.test.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/framework.test.ts b/test/framework.test.ts index 5cb7d0c..ea5cea9 100644 --- a/test/framework.test.ts +++ b/test/framework.test.ts @@ -1,12 +1,12 @@ import path from 'node:path'; import { strict as assert } from 'node:assert'; import fs from 'node:fs'; -import * as mm from 'mm'; +import { mm, restore } from 'mm'; import { getFrameworkPath } from '../src/index.js'; import { getFilepath, testDir } from './helper.js'; describe('test/framework.test.ts', () => { - afterEach(mm.restore); + afterEach(restore); it('should exist when specify baseDir', () => { it('should get egg by default but not exist', () => { diff --git a/test/plugin.test.ts b/test/plugin.test.ts index ad8c8c7..32d8e11 100644 --- a/test/plugin.test.ts +++ b/test/plugin.test.ts @@ -3,7 +3,6 @@ import { strict as assert } from 'node:assert'; import { rm } from 'node:fs/promises'; import fsPromise from 'node:fs/promises'; import { existsSync } from 'node:fs'; -import * as mm from 'mm'; import coffee from 'coffee'; import { runscript } from 'runscript'; import utils from '../src/index.js'; @@ -24,7 +23,6 @@ describe('test/plugin.test.ts', () => { assert(existsSync(tmp), `${tmp} not exists`); }); afterEach(() => rm(tmp, { force: true, recursive: true })); - afterEach(mm.restore); describe('getPlugins()', () => { const bin = path.join(cwd, 'get_plugin.js');