diff --git a/apps/dh-app/src/app/datahub-app.component.spec.ts b/apps/dh-app/src/app/datahub-app.component.spec.ts index 4587408b9b..f46e1be822 100644 --- a/apps/dh-app/src/app/datahub-app.component.spec.ts +++ b/apps/dh-app/src/app/datahub-app.component.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { MATERIAL_SANITY_CHECKS } from '@angular/material/core'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterOutlet } from '@angular/router'; @@ -29,6 +30,8 @@ describe(DataHubAppComponent.name, () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [DataHubAppModule, NoopAnimationsModule, RouterTestingModule], + // https://github.com/thymikee/jest-preset-angular/issues/83 + providers: [{ provide: MATERIAL_SANITY_CHECKS, useValue: false }], }).compileComponents(); }); diff --git a/apps/dh-app/src/app/datahub-app.module.spec.ts b/apps/dh-app/src/app/datahub-app.module.spec.ts index d652b3242b..fb3a073412 100644 --- a/apps/dh-app/src/app/datahub-app.module.spec.ts +++ b/apps/dh-app/src/app/datahub-app.module.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { MATERIAL_SANITY_CHECKS } from '@angular/material/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; @@ -26,6 +27,8 @@ describe('Application smoke test', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [DataHubAppModule, NoopAnimationsModule, RouterTestingModule], + // https://github.com/thymikee/jest-preset-angular/issues/83 + providers: [{ provide: MATERIAL_SANITY_CHECKS, useValue: false }], }).compileComponents(); rootFixture = TestBed.createComponent(DataHubAppComponent); diff --git a/libs/dh-app/core/feature-shell/src/lib/shell/shell.component.spec.ts b/libs/dh-app/core/feature-shell/src/lib/shell/shell.component.spec.ts index b382b6a62e..c4fa234953 100644 --- a/libs/dh-app/core/feature-shell/src/lib/shell/shell.component.spec.ts +++ b/libs/dh-app/core/feature-shell/src/lib/shell/shell.component.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { MATERIAL_SANITY_CHECKS } from '@angular/material/core'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; @@ -29,6 +30,8 @@ describe(ShellComponent.name, () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ShellModule, NoopAnimationsModule, RouterTestingModule], + // https://github.com/thymikee/jest-preset-angular/issues/83 + providers: [{ provide: MATERIAL_SANITY_CHECKS, useValue: false }], }).compileComponents(); }); diff --git a/libs/ett/core/feature-shell/src/lib/shell/ett-shell.component.spec.ts b/libs/ett/core/feature-shell/src/lib/shell/ett-shell.component.spec.ts index 1ad8c36220..6a890ee9a9 100644 --- a/libs/ett/core/feature-shell/src/lib/shell/ett-shell.component.spec.ts +++ b/libs/ett/core/feature-shell/src/lib/shell/ett-shell.component.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { MATERIAL_SANITY_CHECKS } from '@angular/material/core'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; @@ -26,6 +27,8 @@ describe(EttShellComponent.name, () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [EttShellScam, NoopAnimationsModule, RouterTestingModule], + // https://github.com/thymikee/jest-preset-angular/issues/83 + providers: [{ provide: MATERIAL_SANITY_CHECKS, useValue: false }], }).compileComponents(); fixture = TestBed.createComponent(EttShellComponent); diff --git a/libs/ui-watt/src/lib/components/button/watt-button.module.spec.ts b/libs/ui-watt/src/lib/components/button/watt-button.module.spec.ts index 0116ae02d4..9947fb7a9d 100644 --- a/libs/ui-watt/src/lib/components/button/watt-button.module.spec.ts +++ b/libs/ui-watt/src/lib/components/button/watt-button.module.spec.ts @@ -14,8 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Component } from '@angular/core'; +import { Component, NgModule } from '@angular/core'; import { TestBed } from '@angular/core/testing'; +import { MATERIAL_SANITY_CHECKS } from '@angular/material/core'; +import { WattPrimaryButtonComponent } from './primary-button/watt-primary-button.component'; import { WattButtonModule } from './watt-button.module'; @@ -26,9 +28,18 @@ describe(WattButtonModule.name, () => { }) class TestHostComponent {} - TestBed.configureTestingModule({ - declarations: [TestHostComponent], + @NgModule({ imports: [WattButtonModule], + declarations: [TestHostComponent], + // https://github.com/thymikee/jest-preset-angular/issues/83 + providers: [{ provide: MATERIAL_SANITY_CHECKS, useValue: false }], + entryComponents: [WattPrimaryButtonComponent], + exports: [WattButtonModule], + }) + class TestingModule {} + + TestBed.configureTestingModule({ + imports: [TestingModule], }); const fixture = TestBed.createComponent(TestHostComponent);