@@ -57,37 +57,39 @@ describe("ignite-cli generate", () => {
5757 "
5858 ` )
5959 expect ( read ( `${ TEMP_DIR } /app/models/Pizza.ts` ) ) . toMatchInlineSnapshot ( `
60- "import { Instance, SnapshotIn, SnapshotOut, types } from \\"mobx-state-tree\\"
61- import { withSetPropAction } from \\"./helpers/withSetPropAction\\"
60+ "import { Instance, SnapshotIn, SnapshotOut, types } from \\"mobx-state-tree\\"
61+ import { withSetPropAction } from \\"./helpers/withSetPropAction\\"
6262
63- /**
64- * Model description here for TypeScript hints.
65- */
66- export const PizzaModel = types
67- .model(\\"Pizza\\")
68- .props({})
69- .actions(withSetPropAction)
70- .views((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
71- .actions((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
72-
73- export interface Pizza extends Instance<typeof PizzaModel> {}
74- export interface PizzaSnapshotOut extends SnapshotOut<typeof PizzaModel> {}
75- export interface PizzaSnapshotIn extends SnapshotIn<typeof PizzaModel> {}
76- export const createPizzaDefaultModel = () => types.optional(PizzaModel, {})
77-
78- // @mst remove-file"
79- ` )
63+ /**
64+ * Model description here for TypeScript hints.
65+ */
66+ export const PizzaModel = types
67+ .model(\\"Pizza\\")
68+ .props({})
69+ .actions(withSetPropAction)
70+ .views((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
71+ .actions((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
72+
73+ export interface Pizza extends Instance<typeof PizzaModel> {}
74+ export interface PizzaSnapshotOut extends SnapshotOut<typeof PizzaModel> {}
75+ export interface PizzaSnapshotIn extends SnapshotIn<typeof PizzaModel> {}
76+ export const createPizzaDefaultModel = () => types.optional(PizzaModel, {})
77+
78+ // @mst remove-file
79+ "
80+ ` )
8081 expect ( read ( `${ TEMP_DIR } /app/models/Pizza.test.ts` ) ) . toMatchInlineSnapshot ( `
81- "import { PizzaModel } from \\"./Pizza\\"
82+ "import { PizzaModel } from \\"./Pizza\\"
8283
83- test(\\"can be created\\", () => {
84- const instance = PizzaModel.create({})
84+ test(\\"can be created\\", () => {
85+ const instance = PizzaModel.create({})
8586
86- expect(instance).toBeTruthy()
87- })
87+ expect(instance).toBeTruthy()
88+ })
8889
89- // @mst remove-file"
90- ` )
90+ // @mst remove-file
91+ "
92+ ` )
9193 expect ( read ( `${ TEMP_DIR } /app/models/index.ts` ) ) . toMatchInlineSnapshot ( `
9294 "export * from \\"./RootStore\\"
9395 export * from \\"./helpers/getRootStore\\"
@@ -138,37 +140,39 @@ describe("ignite-cli generate", () => {
138140 "
139141 ` )
140142 expect ( read ( `${ TEMP_DIR } /app/models/PizzaStore.ts` ) ) . toMatchInlineSnapshot ( `
141- "import { Instance, SnapshotIn, SnapshotOut, types } from \\"mobx-state-tree\\"
142- import { withSetPropAction } from \\"./helpers/withSetPropAction\\"
143+ "import { Instance, SnapshotIn, SnapshotOut, types } from \\"mobx-state-tree\\"
144+ import { withSetPropAction } from \\"./helpers/withSetPropAction\\"
143145
144- /**
145- * Model description here for TypeScript hints.
146- */
147- export const PizzaStoreModel = types
148- .model(\\"PizzaStore\\")
149- .props({})
150- .actions(withSetPropAction)
151- .views((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
152- .actions((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
153-
154- export interface PizzaStore extends Instance<typeof PizzaStoreModel> {}
155- export interface PizzaStoreSnapshotOut extends SnapshotOut<typeof PizzaStoreModel> {}
156- export interface PizzaStoreSnapshotIn extends SnapshotIn<typeof PizzaStoreModel> {}
157- export const createPizzaStoreDefaultModel = () => types.optional(PizzaStoreModel, {})
158-
159- // @mst remove-file"
160- ` )
146+ /**
147+ * Model description here for TypeScript hints.
148+ */
149+ export const PizzaStoreModel = types
150+ .model(\\"PizzaStore\\")
151+ .props({})
152+ .actions(withSetPropAction)
153+ .views((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
154+ .actions((self) => ({})) // eslint-disable-line @typescript-eslint/no-unused-vars
155+
156+ export interface PizzaStore extends Instance<typeof PizzaStoreModel> {}
157+ export interface PizzaStoreSnapshotOut extends SnapshotOut<typeof PizzaStoreModel> {}
158+ export interface PizzaStoreSnapshotIn extends SnapshotIn<typeof PizzaStoreModel> {}
159+ export const createPizzaStoreDefaultModel = () => types.optional(PizzaStoreModel, {})
160+
161+ // @mst remove-file
162+ "
163+ ` )
161164 expect ( read ( `${ TEMP_DIR } /app/models/PizzaStore.test.ts` ) ) . toMatchInlineSnapshot ( `
162- "import { PizzaStoreModel } from \\"./PizzaStore\\"
165+ "import { PizzaStoreModel } from \\"./PizzaStore\\"
163166
164- test(\\"can be created\\", () => {
165- const instance = PizzaStoreModel.create({})
167+ test(\\"can be created\\", () => {
168+ const instance = PizzaStoreModel.create({})
166169
167- expect(instance).toBeTruthy()
168- })
170+ expect(instance).toBeTruthy()
171+ })
169172
170- // @mst remove-file"
171- ` )
173+ // @mst remove-file
174+ "
175+ ` )
172176 expect ( read ( `${ TEMP_DIR } /app/models/index.ts` ) ) . toMatchInlineSnapshot ( `
173177 "export * from \\"./RootStore\\"
174178 export * from \\"./helpers/getRootStore\\"
0 commit comments