-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adds schematics for service #9945
base: master
Are you sure you want to change the base?
Conversation
@satanTime, can you review this schematic to see if you agree? |
@@ -0,0 +1,21 @@ | |||
import { MockBuilder,MockedComponentFixture, MockInstance, MockRender, } from 'ng-mocks'; | |||
|
|||
import { <%= classify(name)%>Service } from './<%= dasherize(name)%>.service'; |
Check notice
Code scanning / CodeQL
Syntax error Note test
@@ -0,0 +1,21 @@ | |||
import { MockBuilder,MockedComponentFixture, MockInstance, MockRender, } from 'ng-mocks'; | |||
|
|||
import { <%= classify(name)%>Service } from './<%= dasherize(name)%>.service'; |
Check notice
Code scanning / CodeQL
Syntax error Note test
@@ -0,0 +1,21 @@ | |||
import { MockBuilder,MockedComponentFixture, MockInstance, MockRender, } from 'ng-mocks'; | |||
|
|||
import { <%= classify(name)%>Service } from './<%= dasherize(name)%>.service'; |
Check notice
Code scanning / CodeQL
Syntax error Note test
@@ -0,0 +1,21 @@ | |||
import { MockBuilder,MockedComponentFixture, MockInstance, MockRender, } from 'ng-mocks'; | |||
|
|||
import { <%= classify(name)%>Service } from './<%= dasherize(name)%>.service'; |
Check notice
Code scanning / CodeQL
Syntax error Note test
@@ -0,0 +1,21 @@ | |||
import { MockBuilder,MockedComponentFixture, MockInstance, MockRender, } from 'ng-mocks'; | |||
|
|||
import { <%= classify(name)%>Service } from './<%= dasherize(name)%>.service'; |
Check notice
Code scanning / CodeQL
Syntax error Note test
|
||
describe('<%= classify(name)%>Service', () => { | ||
let service: <%= classify(name)%>Service; | ||
let fixture: MockedComponentFixture<<%= classify(name)%>Service>; |
Check notice
Code scanning / CodeQL
Syntax error Note test
|
||
MockInstance.scope(); | ||
|
||
beforeEach(() => MockBuilder(<%= classify(name)%>Service)); |
Check notice
Code scanning / CodeQL
Syntax error Note test
|
||
MockInstance.scope(); | ||
|
||
beforeEach(() => MockBuilder(<%= classify(name)%>Service)); |
Check notice
Code scanning / CodeQL
Syntax error Note test
beforeEach(() => MockBuilder(<%= classify(name)%>Service)); | ||
|
||
beforeEach(() => { | ||
fixture = MockRender(<%= classify(name)%>Service); |
Check notice
Code scanning / CodeQL
Syntax error Note test
beforeEach(() => MockBuilder(<%= classify(name)%>Service)); | ||
|
||
beforeEach(() => { | ||
fixture = MockRender(<%= classify(name)%>Service); |
Check notice
Code scanning / CodeQL
Syntax error Note test
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9945 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 227 227
Lines 4946 4946
Branches 1148 1148
=========================================
Hits 4946 4946 ☔ View full report in Codecov by Sentry. |
They. Thanks a lot! I'm traveling this week and next week and will check asap once I'm back. |
@satanTime I created a discussion so it will be easier to follow this. If you agree, I would like to cancel this PR and split it into multiple:
Please let me know so I can make the adjustments. |
What is the status of this? Been wanting this feature for a long time |
There is a discussion on how this will work. You can see it in #9950. There is some decisions that need to be made regarding the base schematic. Currently, it is pending due to @satanTime not being available. |
Adds the schematic for a service, initial draft.
Starts the development of #6293