Skip to content

Commit d7bdd7f

Browse files
authored
Fix TS tests in Travis CI (#8607)
* remove npm test * remove npm test * rearrange tests * move ts axios tests to circleci * Revert "move ts axios tests to circleci" This reverts commit 356f795. * add moduleResolution: node * update tsconfig.json * add axios installation * install builds/with-npm-version * update samples
1 parent 6fa5866 commit d7bdd7f

6 files changed

Lines changed: 57 additions & 62 deletions

File tree

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,8 @@
11811181
</property>
11821182
</activation>
11831183
<modules>
1184+
<module>samples/client/petstore/typescript-axios/builds/with-npm-version</module>
1185+
<module>samples/client/petstore/typescript-axios/tests/default</module>
11841186
<module>samples/client/petstore/crystal</module>
11851187
<!-- servers -->
11861188
<module>samples/server/petstore/python-aiohttp</module>
@@ -1222,7 +1224,6 @@
12221224
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
12231225
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
12241226
<module>samples/client/petstore/typescript-fetch/tests/default</module>
1225-
<module>samples/client/petstore/typescript-axios/tests/default</module>
12261227
<module>samples/client/petstore/typescript-node/npm</module>
12271228
<module>samples/client/petstore/typescript-rxjs/builds/with-npm-version</module>
12281229
<!-- TODO comment out below when the test for typescript-nestjs is ready
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<project>
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>org.openapitools</groupId>
4+
<artifactId>TSAxiosPestoreTests</artifactId>
5+
<packaging>pom</packaging>
6+
<version>1.0-SNAPSHOT</version>
7+
<name>TS Axios Petstore Test Client</name>
8+
<build>
9+
<plugins>
10+
<plugin>
11+
<artifactId>maven-dependency-plugin</artifactId>
12+
<executions>
13+
<execution>
14+
<phase>package</phase>
15+
<goals>
16+
<goal>copy-dependencies</goal>
17+
</goals>
18+
<configuration>
19+
<outputDirectory>${project.build.directory}</outputDirectory>
20+
</configuration>
21+
</execution>
22+
</executions>
23+
</plugin>
24+
<plugin>
25+
<groupId>org.codehaus.mojo</groupId>
26+
<artifactId>exec-maven-plugin</artifactId>
27+
<version>1.2.1</version>
28+
<executions>
29+
<execution>
30+
<id>npm-install</id>
31+
<phase>pre-integration-test</phase>
32+
<goals>
33+
<goal>exec</goal>
34+
</goals>
35+
<configuration>
36+
<executable>npm</executable>
37+
<arguments>
38+
<argument>install</argument>
39+
</arguments>
40+
</configuration>
41+
</execution>
42+
</executions>
43+
</plugin>
44+
</plugins>
45+
</build>
46+
</project>

samples/client/petstore/typescript-axios/tests/default/package-lock.json

Lines changed: 8 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/petstore/typescript-axios/tests/default/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"moduleResolution": "node",
34
"module": "commonjs",
45
"target": "es5",
56
"noImplicitAny": true,

samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,6 @@
3939
</arguments>
4040
</configuration>
4141
</execution>
42-
<execution>
43-
<id>npm-test</id>
44-
<phase>integration-test</phase>
45-
<goals>
46-
<goal>exec</goal>
47-
</goals>
48-
<configuration>
49-
<executable>npm</executable>
50-
<arguments>
51-
<argument>test</argument>
52-
</arguments>
53-
</configuration>
54-
</execution>
5542
</executions>
5643
</plugin>
5744
</plugins>

samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,6 @@
5353
</arguments>
5454
</configuration>
5555
</execution>
56-
<execution>
57-
<id>npm-test</id>
58-
<phase>integration-test</phase>
59-
<goals>
60-
<goal>exec</goal>
61-
</goals>
62-
<configuration>
63-
<executable>npm</executable>
64-
<arguments>
65-
<argument>test</argument>
66-
</arguments>
67-
</configuration>
68-
</execution>
6956
</executions>
7057
</plugin>
7158
</plugins>

0 commit comments

Comments
 (0)