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