mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-10 05:46:31 +10:00
15 lines
331 B
TypeScript
15 lines
331 B
TypeScript
import fileToPath from '../src/fileToPath'
|
|
|
|
test('fileToPath', () => {
|
|
const asserts: Record<string, string> = {
|
|
'README.md': '/',
|
|
'foo/README.md': '/foo/',
|
|
'foo.md': '/foo.html',
|
|
'foo/bar.md': '/foo/bar.html'
|
|
}
|
|
Object.keys(asserts).forEach(file => {
|
|
expect(fileToPath(file)).toBe(asserts[file])
|
|
})
|
|
})
|
|
|