chore: migrate CI to github, refactore CI and npm scripts, linting fixes (#1023)

This commit is contained in:
Anix
2020-02-14 15:22:53 +05:30
committed by GitHub
parent b3d9b966df
commit 5f7464af48
10 changed files with 71 additions and 28 deletions
+29
View File
@@ -0,0 +1,29 @@
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')
})
})