Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Fix tests to match new API. Added extra unit test for server routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pngwn committed May 17, 2019
1 parent 225844c commit 6710180
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/apps/custom-extension/test.ts
Expand Up @@ -8,7 +8,7 @@ describe('custom extensions', function() {
let r: AppRunner;

// hooks
before('build app', () => build({ cwd: __dirname }));
before('build app', () => build({ cwd: __dirname , ext: '.jesuslivesineveryone .whokilledthemuffinman .mdx .svelte' }));
before('start runner', async () => {
r = await new AppRunner().start(__dirname);
});
Expand Down
17 changes: 15 additions & 2 deletions test/unit/create_manifest_data/test.ts
Expand Up @@ -195,7 +195,7 @@ describe('manifest_data', () => {

assert.deepEqual(pages, [
{
pattern: /^\/?$/,
pattern: /^\/$/,
parts: [
{ component: index, params: [] }
]
Expand All @@ -211,7 +211,6 @@ describe('manifest_data', () => {
{
pattern: /^\/blog\/?$/,
parts: [
null,
{ component: blog, params: [] }
]
},
Expand All @@ -225,5 +224,19 @@ describe('manifest_data', () => {
}
]);

assert.deepEqual(server_routes, [
{
name: 'route_blog_json',
pattern: /^\/blog.json$/,
file: 'blog/index.json.js',
params: []
},
{
name: 'route_blog_$slug_json',
pattern: /^\/blog\/([^\/]+?).json$/,
file: 'blog/[slug].json.js',
params: ['slug']
}
]);
});
});

0 comments on commit 6710180

Please sign in to comment.