File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { format, pluginPath } from './utils'
99const __filename = fileURLToPath ( import . meta. url )
1010const __dirname = path . dirname ( __filename )
1111const execAsync = promisify ( exec )
12- const normalizeLineEndings = ( text : string ) => text . replace ( / \r \n / g, '\n' )
1312
1413let fixtures = [
1514 {
@@ -117,8 +116,10 @@ describe('fixtures', () => {
117116
118117 test . concurrent ( name , async ( { expect } ) => {
119118 let results = await execAsync ( cmd )
120- let formatted = normalizeLineEndings ( results . stdout )
121- let expected = normalizeLineEndings ( await fs . readFile ( outputPath , 'utf-8' ) )
119+ let formatted = results . stdout . replace ( / \r \n / g, '\n' )
120+ let expected = await fs
121+ . readFile ( outputPath , 'utf-8' )
122+ . then ( ( c ) => c . replace ( / \r \n / g, '\n' ) )
122123
123124 expect ( formatted . trim ( ) ) . toEqual ( expected . trim ( ) )
124125 } )
You can’t perform that action at this time.
0 commit comments