@@ -140,21 +140,13 @@ describe('Service generator', () => {
140
140
. read ( 'libs/question/services/question-service/src/index.ts' )
141
141
?. toString ( ) ;
142
142
143
- expect ( indexFile ) . toContain (
144
- "export { useQuestions, queryQuestions, getQuestionsQueryKey } from './lib/useQuestions';"
145
- ) ;
146
- expect ( indexFile ) . toContain (
147
- "export { useQuestion, queryQuestion, getQuestionQueryKey } from './lib/useQuestion';"
148
- ) ;
149
- expect ( indexFile ) . toContain (
150
- "export { useCreateQuestion } from './lib/useCreateQuestion';"
151
- ) ;
152
- expect ( indexFile ) . toContain (
153
- "export { useDeleteQuestion } from './lib/useDeleteQuestion';"
154
- ) ;
155
- expect ( indexFile ) . toContain (
156
- "export { useUpdateQuestion } from './lib/useUpdateQuestion';"
157
- ) ;
143
+ expect ( indexFile ) . toMatchInlineSnapshot ( `
144
+ "export { useQuestion, queryQuestion, getQuestionQueryKey } from './lib/useQuestion';
145
+ export { useQuestions, queryQuestions, getQuestionsQueryKey } from './lib/useQuestions';
146
+ export { useCreateQuestion } from './lib/useCreateQuestion';
147
+ export { useUpdateQuestion } from './lib/useUpdateQuestion';
148
+ export { useDeleteQuestion } from './lib/useDeleteQuestion';"
149
+ ` ) ;
158
150
} ) ;
159
151
160
152
it ( 'should generate react-query service with only selected crud operations' , async ( ) => {
@@ -213,21 +205,10 @@ describe('Service generator', () => {
213
205
. read ( 'libs/question/services/question-service/src/index.ts' )
214
206
?. toString ( ) ;
215
207
216
- expect ( indexFile ) . toContain (
217
- "export { useQuestions, queryQuestions, getQuestionsQueryKey } from './lib/useQuestions';"
218
- ) ;
219
- expect ( indexFile ) . not . toContain (
220
- "export { useQuestion, queryQuestion, getQuestionQueryKey } from './lib/useQuestion';"
221
- ) ;
222
- expect ( indexFile ) . not . toContain (
223
- "export { useCreateQuestion } from './lib/useCreateQuestion';"
224
- ) ;
225
- expect ( indexFile ) . not . toContain (
226
- "export { useDeleteQuestion } from './lib/useDeleteQuestion';"
227
- ) ;
228
- expect ( indexFile ) . toContain (
229
- "export { useUpdateQuestion } from './lib/useUpdateQuestion';"
230
- ) ;
208
+ expect ( indexFile ) . toMatchInlineSnapshot ( `
209
+ "export { useQuestions, queryQuestions, getQuestionsQueryKey } from './lib/useQuestions';
210
+ export { useUpdateQuestion } from './lib/useUpdateQuestion';"
211
+ ` ) ;
231
212
} ) ;
232
213
233
214
it ( 'should camelize query name if service name includes "-"' , async ( ) => {
0 commit comments