In order to thoroughly test the methods in my angular application's components.ts and service.ts files, I am looking to create a custom .spec.ts file that can also test non-value returning methods.
Despite creating a custom spec.ts file for testing my application, unfortunately, the tests are failing.
it('should handle', () => {
expect(component.Id).toBe(null);
component.isKeyUp();
expect(component.show).toBe(true);
});
The issue lies in my custom.spec.ts file where it is showing 'Id not found', even though it runs perfectly in the component.spec.ts file.