Skip to content

Commit f9bda13

Browse files
committed
fix: notBundle test is failed
1 parent f6dabc3 commit f9bda13

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/plugin.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { notBundle } from '../dist/plugin'
1010

1111
const pluginNotBundle = notBundle()
1212
pluginNotBundle.apply = undefined
13+
const normalizingNewLineRE = /[\r\n]+/g
1314

1415
describe('src/plugin', () => {
1516
it('notBundle', async () => {
@@ -29,7 +30,9 @@ describe('src/plugin', () => {
2930

3031
const distMain = fs.readFileSync(path.join(__dirname, '__snapshots__/external-main.js'), 'utf-8')
3132
const snapMain = fs.readFileSync(path.join(__dirname, 'dist/external-main.js'), 'utf-8')
33+
const normalDistMain = distMain.replace(normalizingNewLineRE, '\n')
34+
const normalSnapMain = snapMain.replace(normalizingNewLineRE, '\n')
3235

33-
expect(distMain).equal(snapMain)
36+
expect(normalDistMain).equal(normalSnapMain)
3437
})
3538
})

0 commit comments

Comments
 (0)