export interface User {
name: string;
}
How can I unit test the above interface, so Karma could show it in the code coverage report?
I already tried creating the object and assert some properties, but didn't work. The test passes but karma doesn't consider it in the code coverage report.
import { User } from "./user";
describe('User', () => {
it('test', () => {
const obj: User = {
name: "xxx",
}
expect(obj.name).toEqual("xxx");
});
});
karma-typescript
? It may take in to account un-accessible code like that. npmjs.com/package/karma-typescript – DeeV