Skip to content

Commit

Permalink
test: refactor some regexp, remove {1} (#9388)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-itsheng committed Jul 27, 2022
1 parent 8c62d31 commit b7424b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions playground/assets/__tests__/assets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ describe('image', () => {
srcset.split(', ').forEach((s) => {
expect(s).toMatch(
isBuild
? /\/foo\/assets\/asset\.\w{8}\.png \d{1}x/
: /\/foo\/nested\/asset\.png \d{1}x/
? /\/foo\/assets\/asset\.\w{8}\.png \dx/
: /\/foo\/nested\/asset\.png \dx/
)
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ describe('image', () => {
srcset.split(', ').forEach((s) => {
expect(s).toMatch(
isBuild
? /other-assets\/asset\.\w{8}\.png \d{1}x/
: /\.\/nested\/asset\.png \d{1}x/
? /other-assets\/asset\.\w{8}\.png \dx/
: /\.\/nested\/asset\.png \dx/
)
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ describe('image', () => {
srcset.split(', ').forEach((s) => {
expect(s).toMatch(
isBuild
? /other-assets\/asset\.\w{8}\.png \d{1}x/
: /\.\/nested\/asset\.png \d{1}x/
? /other-assets\/asset\.\w{8}\.png \dx/
: /\.\/nested\/asset\.png \dx/
)
})
})
Expand Down

0 comments on commit b7424b5

Please sign in to comment.