Skip to content

Commit

Permalink
Merge pull request #247 from think-flow/testfix
Browse files Browse the repository at this point in the history
fix: notBundle test is failed
  • Loading branch information
caoxiemeihao authored Sep 18, 2024
2 parents f6dabc3 + f9bda13 commit 149c4a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { notBundle } from '../dist/plugin'

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

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

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

expect(distMain).equal(snapMain)
expect(normalDistMain).equal(normalSnapMain)
})
})

0 comments on commit 149c4a9

Please sign in to comment.