Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit adc8fa3

Browse files
Bobby EarlBlackbaud-PaulCrowder
Bobby Earl
authored andcommitted
Adding dinosaur to the wildcard route (#178)
* Adding dinosaur to the wildcard route * Updated tests
1 parent 65fc09b commit adc8fa3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/sky-pages-route-generator.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ function generateRoutes(skyAppConfig) {
107107
.map(file => parseFileIntoEntity(skyAppConfig, file, counter++));
108108

109109
if (skyAppConfig.runtime.handle404) {
110+
const err = `<sky-error errorType="notfound"></sky-error>`;
110111
entities.push({
111112
componentName: 'NotFoundComponent',
112-
componentDefinition: `@Component({ template: '404' }) export class NotFoundComponent { }`,
113+
componentDefinition: `@Component({ template: '${err}' }) export class NotFoundComponent { }`,
113114
routePath: ['**'],
114115
routeParams: []
115116
});

test/sky-pages-module-generator.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('SKY UX Builder module generator', () => {
2323
runtime: runtimeUtils.getDefaultRuntime(),
2424
skyux: {}
2525
});
26-
expect(source).toContain("template: '404'");
26+
expect(source).toContain("template: '<sky-error errorType=\"notfound\"></sky-error>'");
2727
});
2828

2929
it('should not add the NotFoundComponent if it exists', () => {
@@ -39,7 +39,7 @@ describe('SKY UX Builder module generator', () => {
3939
skyux: {}
4040
});
4141
expect(source).toContain('NotFoundComponent');
42-
expect(source).not.toContain("template: '404'");
42+
expect(source).not.toContain("template: '<sky-error errorType=\"notfound\"></sky-error>'");
4343
});
4444

4545
it('should allow the SKY UX Builder out alias to be overridden', () => {

0 commit comments

Comments
 (0)