fix(router/parsing): change route rule error to say PascalCase instead of CamelCase

Closes #7874
This commit is contained in:
Pete Mertz 2016-04-01 18:24:45 -04:00 committed by Misko Hevery
parent ac6959c819
commit 830aecd1a7
3 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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;
})}));

View File

@ -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".`);
});