Skip to content

Commit

Permalink
feat: add get-merge-loader-template-reg.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyao committed Sep 18, 2024
1 parent b612a77 commit f8afa97
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { getMergeLoaderTemplateReg } from '../utils'

describe('getMergeLoaderTemplateReg', () => {
it('should return match current template RegExp', () => {
const input1 = '.xhsml' // 小红书小程序模版后缀
const input2 = '.ksml' // 快手小程序模版后缀
expect(getMergeLoaderTemplateReg(input1)).toEqual(/\.(wxml|axml|ttml|qml|swan|jxml|xhsml)(\?.*)?$/)
expect(getMergeLoaderTemplateReg(input2)).toEqual(/\.(wxml|axml|ttml|qml|swan|jxml|ksml)(\?.*)?$/)
})
})

0 comments on commit f8afa97

Please sign in to comment.