mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-23 15:41:32 +00:00
get tests passing
This commit is contained in:
@@ -47,7 +47,6 @@
|
|||||||
"eslint": "^4.13.1",
|
"eslint": "^4.13.1",
|
||||||
"eslint-plugin-import": "^2.8.0",
|
"eslint-plugin-import": "^2.8.0",
|
||||||
"express": "^4.16.3",
|
"express": "^4.16.3",
|
||||||
"get-port": "^3.2.0",
|
|
||||||
"mocha": "^5.0.4",
|
"mocha": "^5.0.4",
|
||||||
"nightmare": "^3.0.0",
|
"nightmare": "^3.0.0",
|
||||||
"npm-run-all": "^4.1.2",
|
"npm-run-all": "^4.1.2",
|
||||||
@@ -60,7 +59,6 @@
|
|||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"svelte": "^2.4.4",
|
"svelte": "^2.4.4",
|
||||||
"svelte-loader": "^2.9.0",
|
"svelte-loader": "^2.9.0",
|
||||||
"ts-node": "^6.0.2",
|
|
||||||
"typescript": "^2.8.3",
|
"typescript": "^2.8.3",
|
||||||
"walk-sync": "^0.3.2",
|
"walk-sync": "^0.3.2",
|
||||||
"webpack": "^4.1.0"
|
"webpack": "^4.1.0"
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export default function create_routes({ files } = { files: glob.sync('**/*.*', {
|
|||||||
parts
|
parts
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
.filter(Boolean)
|
||||||
.filter((a, index, array) => {
|
.filter((a, index, array) => {
|
||||||
const found = array.slice(index + 1).find(b => a.base === b.base);
|
const found = array.slice(index + 1).find(b => a.base === b.base);
|
||||||
if (found) found.files.push(...a.files);
|
if (found) found.files.push(...a.files);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ describe('create_routes', () => {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
it('encodes caharcters not allowed in path', () => {
|
it('encodes characters not allowed in path', () => {
|
||||||
const routes = create_routes({
|
const routes = create_routes({
|
||||||
files: [
|
files: [
|
||||||
'"',
|
'"',
|
||||||
@@ -178,7 +178,7 @@ describe('create_routes', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
routes.map(r => r.file),
|
routes.map(r => r.handlers[0].file),
|
||||||
['.well-known']
|
['.well-known']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user