File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -270,11 +270,18 @@ describe('apify run', () => {
270270 it ( 'run with purge works without storage folder' , async ( ) => {
271271 await rimrafPromised ( getLocalStorageDir ( ) ) ;
272272
273- writeFileSync ( joinPath ( 'src/main.js' ) , 'console.log("hello world");' , { flag : 'w' } ) ;
273+ writeFileSync (
274+ joinPath ( 'src/main.js' ) ,
275+ `
276+ import { writeFileSync } from 'node:fs';
277+ writeFileSync('${ joinPath ( 'result.txt' ) } ', 'hello world');
278+ ` ,
279+ { flag : 'w' } ,
280+ ) ;
274281
275282 await runCommand ( RunCommand , { flags_purge : true } ) ;
276283
277- expect ( lastErrorMessage ( ) ) . toMatch ( / n p m (?: \. c m d ) r u n s t a r t / ) ;
284+ expect ( existsSync ( joinPath ( 'result.txt' ) ) ) . toBeTruthy ( ) ;
278285 } ) ;
279286
280287 describe ( 'input tests' , ( ) => {
You can’t perform that action at this time.
0 commit comments