mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
501 B
13 lines
501 B
import { ensureStartingSlash } from 'client/theme-default/support/utils'
|
|
|
|
describe('client/theme-default/utils', () => {
|
|
describe('ensureStartingSlash', () => {
|
|
test('it adds slash to the beginning of the given path', () => {
|
|
expect(ensureStartingSlash('path')).toBe('/path')
|
|
expect(ensureStartingSlash('path/nested')).toBe('/path/nested')
|
|
expect(ensureStartingSlash('/path')).toBe('/path')
|
|
expect(ensureStartingSlash('/path/nested')).toBe('/path/nested')
|
|
})
|
|
})
|
|
})
|