'unused expression, expected an assignment or function call' in an angular unit test when running tslint 'unused expression, expected an assignment or function call' in an angular unit test when running tslint typescript typescript

'unused expression, expected an assignment or function call' in an angular unit test when running tslint


Did you perhaps mean this:

expect(testAppComponent instanceof AppComponent).toBe(true);

The expression you have there just accesses a bunch of properties, you need some kind of function call for it to actually do anything.