-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I just updated my angular app and I am seeing this issue when I run my unit tests
Unexpected value 'NgxJdenticonModule' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation.
Related packages
"@angular/core": "~13.3.5",
"jdenticon": "^3.1.1",
"ngx-jdenticon": "^1.0.4",
"@angular-builders/jest": "13.0.3",
"jest": "27.5.1",
I looked at the NgxJdenticonModule
source and it seems to have an "@NgModule annotation." so I'm not sure whats going on.
The unit test is simple enough
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NgxJdenticonModule } from 'ngx-jdenticon';
import { CandidateAvatarComponent } from './candidate-avatar.component';
describe('CandidateAvatarComponent', () => {
let component: CandidateAvatarComponent;
let fixture: ComponentFixture<CandidateAvatarComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CandidateAvatarComponent],
imports: [NgxJdenticonModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
teardown: { destroyAfterEach: false },
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(CandidateAvatarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('CandidateAvatarComponent: should create', () => {
expect(component).toBeTruthy();
});
});
Metadata
Metadata
Assignees
Labels
No labels