Skip to content

Commit 5a400d7

Browse files
koddssontimjacobi
authored andcommitted
add test for when users dont pass a relay runtime module
1 parent 3000351 commit 5a400d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/formatGeneratedModule-test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,16 @@ describe('formatGeneratedModule', () => {
4848
sourceHash: 'edcba',
4949
})).toMatchFile(join(__dirname, 'fixtures/generated-module/complete-example.ts'))
5050
})
51+
52+
it('works without passing relay runtime module explicitly', () => {
53+
expect(formatGeneratedModule({
54+
moduleName: 'complete-example',
55+
documentType: 'ConcreteFragment',
56+
docText: null,
57+
concreteText: JSON.stringify({ the: { fragment: { data: 42 } }}),
58+
typeText: 'export type CompleteExample = { readonly id: string }',
59+
hash: 'abcde',
60+
sourceHash: 'edcba',
61+
})).toMatchFile(join(__dirname, 'fixtures/generated-module/complete-example.ts'))
62+
})
5163
})

0 commit comments

Comments
 (0)