diff --git a/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/customTest.esm.t b/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/customTest.esm.t index 9ae0f28..ed90532 100644 --- a/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/customTest.esm.t +++ b/src/codegen/.hygen/templates/powerhouse/generate-document-model-module/customTest.esm.t @@ -3,19 +3,18 @@ to: "<%= rootDir %>/<%= h.changeCase.param(documentType) %>/src/tests/<%= module unless_exists: true --- /** -* This is a scaffold file meant for customization: -* - change it by adding new tests or modifying the existing ones -*/ + * This is a scaffold file meant for customization: + * - change it by adding new tests or modifying the existing ones + */ import { generateMock } from '@powerhousedao/codegen'; import utils from '../../gen/utils'; -import { z } from '../../gen/schema'; +import { z } from '../../gen/schema'; import { reducer } from '../../gen/reducer'; import * as creators from '../../gen/<%= module %>/creators'; import { <%= h.changeCase.pascal(documentType) %>Document } from '../../gen/types'; - describe('<%= h.changeCase.pascal(module) %> Operations', () => { let document: <%= h.changeCase.pascal(documentType) %>Document; @@ -26,13 +25,17 @@ describe('<%= h.changeCase.pascal(module) %> Operations', () => { <% actions.forEach(action => { _%> it('should handle <%= h.changeCase.camel(action.name) %> operation', () => { const input = generateMock(z.<%= h.changeCase.pascal(action.name) %>InputSchema()); - const updatedDocument = reducer(document, creators.<%= h.changeCase.camel(action.name) %>(input)); + const updatedDocument = reducer( + document, + creators.<%= h.changeCase.camel(action.name) %>(input), + ); expect(updatedDocument.operations.<%= action.scope %>).toHaveLength(1); - expect(updatedDocument.operations.<%= action.scope %>[0].type).toBe('<%= h.changeCase.constant(action.name) %>'); + expect(updatedDocument.operations.<%= action.scope %>[0].type).toBe( + '<%= h.changeCase.constant(action.name) %>', + ); expect(updatedDocument.operations.<%= action.scope %>[0].input).toStrictEqual(input); expect(updatedDocument.operations.<%= action.scope %>[0].index).toEqual(0); }); - <% }); _%> -}); \ No newline at end of file +}); diff --git a/src/codegen/.hygen/templates/powerhouse/generate-document-model/documentModelTest.esm.t b/src/codegen/.hygen/templates/powerhouse/generate-document-model/documentModelTest.esm.t index 12133c5..b711150 100644 --- a/src/codegen/.hygen/templates/powerhouse/generate-document-model/documentModelTest.esm.t +++ b/src/codegen/.hygen/templates/powerhouse/generate-document-model/documentModelTest.esm.t @@ -3,9 +3,9 @@ to: "<%= rootDir %>/<%= h.changeCase.param(documentType) %>/src/tests/document-m unless_exists: true --- /** -* This is a scaffold file meant for customization: -* - change it by adding new tests or modifying the existing ones -*/ + * This is a scaffold file meant for customization: + * - change it by adding new tests or modifying the existing ones + */ import utils, { initialGlobalState, initialLocalState } from '../../gen/utils';