Skip to content

Commit b919bd1

Browse files
committed
test(cli): fix remove task import
1 parent f9a35c7 commit b919bd1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/tools/kolibri-cli/test/remove-task.spec.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ import fs from 'fs';
33
import os from 'os';
44
import path from 'path';
55

6-
const { createRequire } = require('module');
7-
86
describe('RemoveTask', () => {
97
it('executes rimraf command', async () => {
108
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'kolibri-cli-'));
119
const filePath = path.join(tmpDir, 'to-remove.txt');
1210
fs.writeFileSync(filePath, 'data');
1311

14-
const require = createRequire(__filename);
1512
const childProc = require('child_process');
1613
const original = childProc.execSync;
1714
let executed = '';
@@ -21,8 +18,7 @@ describe('RemoveTask', () => {
2118
return Buffer.from('');
2219
};
2320

24-
// @ts-ignore importing compiled file
25-
const { RemoveTask } = await import('../dist/migrate/runner/tasks/common/RemoveTask.js');
21+
const { RemoveTask } = require('../src/migrate/runner/tasks/common/RemoveTask');
2622
const task = RemoveTask.getInstance(filePath, '^1');
2723
task.run();
2824
childProc.execSync = original;

0 commit comments

Comments
 (0)