fix(ivy): a couple of typos in error messages (#31571)

Fixes a couple of typos that were noticed after the initial PR (#31543) got merged in.

PR Close #31571
This commit is contained in:
crisbeto
2019-07-15 21:11:10 +02:00
committed by Matias Niemelä
parent 54794f9b31
commit 9e83822679
2 changed files with 10 additions and 7 deletions

View File

@ -1428,7 +1428,8 @@ describe('acceptance integration tests', () => {
.createComponent(SomeComponent);
})
.toThrowError(
`Unexpected directive 'SomeComponent' imported by the module 'ModuleWithImportedComponent'. Please add a @NgModule annotation.`);
// The ViewEngine error has a typo, whereas the Ivy one fixes it.
/^Unexpected directive 'SomeComponent' imported by the module 'ModuleWithImportedComponent'\. Please add (a|an) @NgModule annotation\.$/);
});
it('should throw with descriptive error message when a pipe is passed to imports', () => {
@ -1446,7 +1447,8 @@ describe('acceptance integration tests', () => {
.createComponent(FixtureComponent);
})
.toThrowError(
`Unexpected pipe 'SomePipe' imported by the module 'ModuleWithImportedPipe'. Please add a @NgModule annotation.`);
// The ViewEngine error has a typo, whereas the Ivy one fixes it.
/^Unexpected pipe 'SomePipe' imported by the module 'ModuleWithImportedPipe'\. Please add (a|an) @NgModule annotation\.$/);
});
it('should throw with descriptive error message when a module is passed to declarations', () => {
@ -1501,7 +1503,8 @@ describe('acceptance integration tests', () => {
.createComponent(FixtureComponent);
})
.toThrowError(
`Unexpected value 'SomeModule' imported by the module 'ModuleWithImportedModule'. Please add a @NgModule annotation.`);
// The ViewEngine error has a typo, whereas the Ivy one fixes it.
/^Unexpected value 'SomeModule' imported by the module 'ModuleWithImportedModule'\. Please add (a|an) @NgModule annotation\.$/);
});
});