Skip to content

Commit b1d3b34

Browse files
author
Antoine Doubovetzky
committed
♻️ (codegen) split test cases in parsers-commons-test
1 parent e9a1d88 commit b1d3b34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe('assertGenericTypeAnnotationHasExactlyOneTypeParameter', () => {
135135
).toThrow(Error);
136136
});
137137

138-
it("throws an IncorrectlyParameterizedGenericParserError if typeParameters don't have 1 exactly parameter", () => {
138+
it('throws an IncorrectlyParameterizedGenericParserError if TypeAnnotation has more than one type parameter', () => {
139139
const moduleName = 'testModuleName';
140140
const typeAnnotationWithTwoParams = {
141141
typeParameters: {
@@ -153,7 +153,10 @@ describe('assertGenericTypeAnnotationHasExactlyOneTypeParameter', () => {
153153
'Flow',
154154
),
155155
).toThrow(IncorrectlyParameterizedGenericParserError);
156+
});
156157

158+
it('throws an IncorrectlyParameterizedGenericParserError if TypeAnnotation has no type parameter', () => {
159+
const moduleName = 'testModuleName';
157160
const typeAnnotationWithNoParams = {
158161
typeParameters: {
159162
params: [],

0 commit comments

Comments
 (0)