Skip to content

Commit

Permalink
test: add absolute file path test
Browse files Browse the repository at this point in the history
  • Loading branch information
yzydeveloper committed Oct 20, 2022
1 parent 39ca0d0 commit f7c41be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/vite/src/node/__tests__/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ describe('injectQuery', () => {
'C:/User/Vite/Project?direct'
)
})

test('absolute file path', () => {
expect(injectQuery('C:\\test-file.vue', 'direct')).toEqual(
'C:/test-file.vue?direct'
)
})

test('absolute file path with parameters', () => {
expect(
injectQuery('C:\\test-file.vue?vue&type=template&lang.js', 'direct')
).toEqual('C:/test-file.vue?direct&vue&type=template&lang.js')
})
}

test('relative path', () => {
Expand Down

0 comments on commit f7c41be

Please sign in to comment.