fix(router/parsing): change route rule error to say PascalCase instead of CamelCase
Closes #7874
This commit is contained in:
parent
ac6959c819
commit
830aecd1a7
|
@ -49,7 +49,7 @@ export class RuleSet {
|
|||
if (isPresent(config.name) && config.name[0].toUpperCase() != config.name[0]) {
|
||||
let suggestedName = config.name[0].toUpperCase() + config.name.substring(1);
|
||||
throw new BaseException(
|
||||
`Route "${config.path}" with name "${config.name}" does not begin with an uppercase letter. Route names should be CamelCase like "${suggestedName}".`);
|
||||
`Route "${config.path}" with name "${config.name}" does not begin with an uppercase letter. Route names should be PascalCase like "${suggestedName}".`);
|
||||
}
|
||||
|
||||
if (config instanceof AuxRoute) {
|
||||
|
|
|
@ -172,7 +172,7 @@ export function main() {
|
|||
.catch((e) => {
|
||||
expect(e.originalException)
|
||||
.toContainError(
|
||||
`Route "/child" with name "child" does not begin with an uppercase letter. Route names should be CamelCase like "Child".`);
|
||||
`Route "/child" with name "child" does not begin with an uppercase letter. Route names should be PascalCase like "Child".`);
|
||||
async.done();
|
||||
return null;
|
||||
})}));
|
||||
|
@ -185,7 +185,7 @@ export function main() {
|
|||
.catch((e) => {
|
||||
expect(e.originalException)
|
||||
.toContainError(
|
||||
`Route "/child" with name "child" does not begin with an uppercase letter. Route names should be CamelCase like "Child".`);
|
||||
`Route "/child" with name "child" does not begin with an uppercase letter. Route names should be PascalCase like "Child".`);
|
||||
async.done();
|
||||
return null;
|
||||
})}));
|
||||
|
|
|
@ -164,7 +164,7 @@ export function main() {
|
|||
expect(() => recognizer.config(
|
||||
new Route({path: 'app/user/:name', component: DummyCmpA, name: 'user'})))
|
||||
.toThrowError(
|
||||
`Route "app/user/:name" with name "user" does not begin with an uppercase letter. Route names should be CamelCase like "User".`);
|
||||
`Route "app/user/:name" with name "user" does not begin with an uppercase letter. Route names should be PascalCase like "User".`);
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue