Replies: 2 comments
-
ProposalConsider a service to be created with the name import { MockBuilder,MockedComponentFixture, MockInstance, MockRender, } from 'ng-mocks';
import { FooBarService } from './foo-bar.service';
describe('FooBarService', () => {
let service: FooBarService;
let fixture: MockedComponentFixture<FooBarService>;
MockInstance.scope();
beforeEach(() => MockBuilder(FooBarService));
beforeEach(() => {
fixture = MockRender(FooBarService);
service = fixture.point.componentInstance;
})
it('should be created', () => {
expect(service).toBeTruthy();
});
}); Issues
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@satanTime any news on this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Schematics for ngMocks
Author: @JsantosDK
Goal
The primary goal is to avoid the current need to remake the initial setup that is created via the
@angular/cli
.Current Status:
Discussing a proposal for the schematic for Services.
Conclusion
The MVP for this PR to be considered complete is:
Linked tickets
Beta Was this translation helpful? Give feedback.
All reactions