Is there a method to resolve this issue without needing to insert an ignore directive in the file?
Error encountered during command execution:
./node_modules/tslint/bin/tslint -p src/tsconfig.json --type-check src/app/app.component.spec.ts
[21, 5]: unused expression, expected an assignment or function call
Test case:
let chai = require('chai');
let expect = chai.expect;
import { AppComponent } from './app.component';
import { ComponentFixture, TestBed } from '@angular/core/testing';
describe('AppComponent', function() {
let testAppComponent: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [AppComponent]
});
fixture = TestBed.createComponent(AppComponent);
testAppComponent = fixture.componentInstance;
});
it('should correctly instantiate the component', () => {
expect(testAppComponent instanceof AppComponent).to.be.true;
});
});