mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
* UPDATE .eslintrc * UPDATE lint task * FIX lint errors * CLEANUP * FIX no-eq-null warning * FIX many jsdoc warnings * FIX jsdoc issues * FIX jsdoc warnings * FIX jsdoc * FIX eqeq and no-eq-null * ADD lint to travis * UPDATE test env for eslint
30 lines
718 B
JavaScript
30 lines
718 B
JavaScript
require = require('esm')(module/* , options */) /* eslint-disable-line no-global-assign */
|
|
const { expect } = require('chai')
|
|
const { resolvePath } = require('../../src/core/router/util')
|
|
|
|
describe('router/util', function () {
|
|
it('resolvePath', async function () {
|
|
// WHEN
|
|
const result = resolvePath('hello.md')
|
|
|
|
// THEN
|
|
expect(result).equal('/hello.md')
|
|
})
|
|
|
|
it('resolvePath with dot', async function () {
|
|
// WHEN
|
|
const result = resolvePath('./hello.md')
|
|
|
|
// THEN
|
|
expect(result).equal('/hello.md')
|
|
})
|
|
|
|
it('resolvePath with two dots', async function () {
|
|
// WHEN
|
|
const result = resolvePath('test/../hello.md')
|
|
|
|
// THEN
|
|
expect(result).equal('/hello.md')
|
|
})
|
|
})
|