Skip to content

Commit b71cd24

Browse files
author
esuau
committed
test(search): Add I18nModule to test imports
1 parent 6d8b0fd commit b71cd24

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/search/search.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { By } from "@angular/platform-browser";
33

44
import { Search } from "./search.component";
55
import { FormsModule } from "@angular/forms";
6+
import { I18nModule } from "../i18n/i18n.module";
67

78
describe("Search", () => {
89
let component: Search;
@@ -14,7 +15,7 @@ describe("Search", () => {
1415
beforeEach(() => {
1516
TestBed.configureTestingModule({
1617
declarations: [Search],
17-
imports: [FormsModule],
18+
imports: [FormsModule, I18nModule],
1819
providers: []
1920
});
2021
});

src/search/search.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
HostBinding
77
} from "@angular/core";
88
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from "@angular/forms";
9-
import { I18n } from "./../i18n/i18n.module";
9+
import { I18n } from "../i18n/i18n.module";
1010

1111
/**
1212
* Used to emit changes performed on search components.
@@ -151,7 +151,7 @@ export class Search implements ControlValueAccessor {
151151
* @param i18n The i18n translations.
152152
* @memberof Search
153153
*/
154-
constructor(private i18n: I18n) {
154+
constructor(protected i18n: I18n) {
155155
Search.searchCount++;
156156
}
157157

0 commit comments

Comments
 (0)