File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
packages/tools/kolibri-cli/test Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,12 @@ import fs from 'fs';
33import os from 'os' ;
44import path from 'path' ;
55
6- const { createRequire } = require ( 'module' ) ;
7-
86describe ( '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 ;
You can’t perform that action at this time.
0 commit comments