Skip to content

Commit 0c0d414

Browse files
committed
fix: make unit tests runnable in a Maven project
1 parent b49618d commit 0c0d414

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"required": false
120120
}
121121
},
122-
"generator": ">=1.8.27 <2.0.0",
122+
"generator": ">=1.8.27",
123123
"filters": [
124124
"@asyncapi/generator-filters"
125125
],

template/pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,19 @@
140140
<artifactId>spring-boot-maven-plugin</artifactId>
141141
<version>{%- if params.springBoot2 %}2.7.15{% else %}3.1.3{% endif %}</version>
142142
</plugin>
143+
<plugin>
144+
<groupId>org.apache.maven.plugins</groupId>
145+
<artifactId>maven-surefire-plugin</artifactId>
146+
<version>3.5.4</version>
147+
<dependencies>
148+
<dependency>
149+
<groupId>org.apache.maven.surefire</groupId>
150+
<artifactId>surefire-junit4</artifactId>
151+
<version>3.5.4</version>
152+
</dependency>
153+
</dependencies>
154+
</plugin>
143155
</plugins>
144156
</build>
145157

146-
</project>
158+
</project>

tests/__snapshots__/parameters.test.js.snap

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,23 @@ exports[`integration tests for generated files under different template paramete
128128
<artifactId>spring-boot-maven-plugin</artifactId>
129129
<version>3.1.3</version>
130130
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-surefire-plugin</artifactId>
134+
<version>3.5.4</version>
135+
<dependencies>
136+
<dependency>
137+
<groupId>org.apache.maven.surefire</groupId>
138+
<artifactId>surefire-junit4</artifactId>
139+
<version>3.5.4</version>
140+
</dependency>
141+
</dependencies>
142+
</plugin>
131143
</plugins>
132144
</build>
133145
134-
</project>"
146+
</project>
147+
"
135148
`;
136149
137150
exports[`integration tests for generated files under different template parameters should generate spring 2 code with parameter 1`] = `

0 commit comments

Comments
 (0)