mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
test: enable typescript-axios integration test (#8163)
* test: enable typescript-axios integration test * chore: update old dep & devDep * refactor: use axios installed in test target * chore(travisCI): update node version from v8.12.0 to v12.20.0
This commit is contained in:
parent
9b6fd5a27d
commit
6a2ba0e615
@ -68,6 +68,8 @@ before_install:
|
||||
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
|
||||
# required when sudo: required for the Ruby petstore tests
|
||||
- gem install bundler
|
||||
- nvm install 12.20.0
|
||||
- nvm use 12.20.0
|
||||
- npm install -g typescript
|
||||
- npm install -g npm
|
||||
- npm config set registry http://registry.npmjs.org/
|
||||
|
3
pom.xml
3
pom.xml
@ -1221,8 +1221,7 @@
|
||||
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
|
||||
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
|
||||
<module>samples/client/petstore/typescript-fetch/tests/default</module>
|
||||
<!-- comment out due to CI failure, e.g. https://travis-ci.org/OpenAPITools/openapi-generator/builds/574865730
|
||||
<module>samples/client/petstore/typescript-axios/tests/default</module>-->
|
||||
<module>samples/client/petstore/typescript-axios/tests/default</module>
|
||||
<module>samples/client/petstore/typescript-node/npm</module>
|
||||
<module>samples/client/petstore/typescript-rxjs/builds/with-npm-version</module>
|
||||
<!-- comment out due to error `npm run build`
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,28 +2,22 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version",
|
||||
"axios": "0.19.2",
|
||||
"chai": "^4.1.0",
|
||||
"ts-node": "^3.3.0"
|
||||
"chai": "^4.2.0",
|
||||
"ts-node": "^9.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "npm install ../../builds/with-npm-version && npm run build",
|
||||
"test": "mocha test/*.ts --compilers ts:ts-node/register --timeout 10000",
|
||||
"preinstall": "npm install ../../builds/with-npm-version && npm run build",
|
||||
"test": "mocha test/*.ts --require ts-node/register --timeout 10000",
|
||||
"build": "tsc",
|
||||
"webpack": "webpack",
|
||||
"browserify": "browserify test -p [ tsify ] > ./dist/test.browserify-bundle.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.0.1",
|
||||
"@types/mocha": "^2.2.41",
|
||||
"@types/node": "^8.0.14",
|
||||
"browserify": "^14.4.0",
|
||||
"mocha": "^3.4.2",
|
||||
"ts-loader": "^5.1.0",
|
||||
"tsify": "^3.0.1",
|
||||
"typescript": "^2.4.1",
|
||||
"typings": "^2.1.1",
|
||||
"webpack": "^1.13.0"
|
||||
"@types/chai": "^4.2.14",
|
||||
"@types/node": "^14.14.14",
|
||||
"@types/mocha": "^8.2.0",
|
||||
"browserify": "^17.0.0",
|
||||
"mocha": "^8.2.1",
|
||||
"typescript": "^4.1.2"
|
||||
},
|
||||
"name": "typescript-fetch-test",
|
||||
"version": "1.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { expect } from "chai";
|
||||
import { PetApi, Pet, PetStatusEnum, Category } from "@openapitools/typescript-axios-petstore";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "axios";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios";
|
||||
|
||||
describe("PetApi", () => {
|
||||
function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void {
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
Category
|
||||
} from "@openapitools/typescript-axios-petstore";
|
||||
import { Configuration } from "@openapitools/typescript-axios-petstore";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "axios";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios";
|
||||
|
||||
let config: Configuration;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { expect } from "chai";
|
||||
import { StoreApi } from "@openapitools/typescript-axios-petstore";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "axios";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios";
|
||||
|
||||
describe("StoreApi", function() {
|
||||
function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { expect } from "chai";
|
||||
import { StoreApiFactory } from "@openapitools/typescript-axios-petstore";
|
||||
import { Configuration } from "@openapitools/typescript-axios-petstore";
|
||||
import {AxiosInstance, AxiosResponse} from "axios";
|
||||
import axios from "axios";
|
||||
import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios";
|
||||
|
||||
let config: Configuration;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user