File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import fs from "node:fs/promises " ;
1+ import fs from "node:fs" ;
22import { getFixturesPath , runCli } from "../utils" ;
33
4- // `.js` files are ignored in `.gitignore`
5- const files = [
4+ // These `.js` files are ignored in `.gitignore`, so we need to write them manually here
5+ [
66 "ignore-path/ignore-path-test/ignored-by-customignore.js" ,
77 "ignore-path/ignore-path-test/ignored-by-gitignore.js" ,
88 "ignore-path/ignore-path-test/ignored-by-prettierignore.js" ,
9- ] . map ( getFixturesPath ) ;
10-
11- const clean = ( ) =>
12- Promise . all ( files . map ( ( file ) => fs . rm ( file , { force : true } ) ) ) ;
13- const setup = ( ) =>
14- Promise . all ( files . map ( ( file ) => fs . writeFile ( file , " a+ b" ) ) ) ;
15-
16- beforeAll ( setup ) ;
17- afterAll ( clean ) ;
9+ ] . forEach ( file => {
10+ fs . writeFileSync ( getFixturesPath ( file ) , " a+ b" ) ;
11+ } ) ;
1812
1913const getUnformattedFiles = async ( args ) => {
2014 const { stdout } = await runCli ( "ignore-path/ignore-path-test/" , [
You can’t perform that action at this time.
0 commit comments