carbon-tutorial-angular
carbon-tutorial-angular copied to clipboard
Step 2: ng test error in repo-table.component.spec.ts
Had to resolve ng test error after completing Step 2 in the tutorial.
The tutorial steps do not mention adding:
import { TableModule } from 'carbon-components-angular';to the file headimports: [ TableModule ]to theTestBeddeclaration
These steps should be added to Build repo page tutorial steps.
I ran into the same problem, thank you for the hint!
import { GridModule, TableModule } from "carbon-components-angular";
describe("RepoTableComponent", () => {
let component: RepoTableComponent;
let fixture: ComponentFixture<RepoTableComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [RepoTableComponent],
imports: [GridModule, TableModule],
}).compileComponents();
}));
Thanks @huineng and @warnerjc