Skip to content

Commit

Permalink
fix: Update package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Mar 13, 2020
1 parent 82f4306 commit e408a8c
Show file tree
Hide file tree
Showing 41 changed files with 1,921 additions and 4,903 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -64,3 +64,4 @@ test/**/*.d.ts.map
/test/integration/app/spec/swagger.json
/docs/.vuepress/dist
/mongodb-binaries
/packages/multipartfiles/test/.tmp/
12 changes: 12 additions & 0 deletions .mocharc.js
@@ -0,0 +1,12 @@
module.exports = {
require: [
'ts-node/register/transpile-only',
'tsconfig-paths/register',
'tasks/mocha/register'
],
recursive: true,
reporter: 'dot',
spec: [
'packages/**/*.spec.ts'
]
}
30 changes: 15 additions & 15 deletions examples/aws/package.json
Expand Up @@ -49,7 +49,7 @@
"aws-serverless-express": "3.3.6",
"body-parser": "1.19.0",
"compression": "1.7.4",
"concurrently": "5.0.0",
"concurrently": "5.1.0",
"cors": "2.8.5",
"cookie-parser": "1.4.4",
"express": "4.17.1",
Expand All @@ -58,28 +58,28 @@
"ts-json-properties": "2.0.3"
},
"devDependencies": {
"@types/chai": "4.2.5",
"@types/chai-as-promised": "^7.1.0",
"@types/express": "4.17.2",
"@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.2",
"@types/express": "4.17.3",
"@types/http-proxy": "^1.16.2",
"@types/mocha": "5.2.7",
"@types/node": "12.12.9",
"@types/mocha": "7.0.2",
"@types/node": "13.9.1",
"@types/request-promise": "^4.1.41",
"@types/sinon": "7.5.0",
"@types/sinon": "7.5.2",
"@types/sinon-chai": "3.2.3",
"@types/supertest": "2.0.8",
"chai": "4.2.0",
"chai-as-promised": "^7.1.1",
"cross-env": "6.0.3",
"mocha": "6.2.2",
"cross-env": "7.0.2",
"mocha": "7.1.0",
"nodemon": "^1.17.5",
"nyc": "14.1.1",
"nyc": "15.0.0",
"rimraf": "^2.6.2",
"sinon": "7.5.0",
"sinon-chai": "3.3.0",
"sinon": "9.0.1",
"sinon-chai": "3.5.0",
"supertest": "^4.0.2",
"ts-node": "8.5.2",
"tslint": "5.20.1",
"typescript": "3.7.5"
"ts-node": "8.6.2",
"tslint": "6.1.0",
"typescript": "3.8.3"
}
}
30 changes: 15 additions & 15 deletions examples/getting-started/package.json
Expand Up @@ -32,37 +32,37 @@
"body-parser": "1.19.0",
"cors": "2.8.5",
"compression": "1.7.4",
"concurrently": "5.0.0",
"concurrently": "5.1.0",
"cookie-parser": "1.4.4",
"express": "4.17.1",
"method-override": "^3.0.0",
"node-uuid": "1.4.8",
"cross-env": "6.0.3"
"cross-env": "7.0.2"
},
"devDependencies": {
"@types/chai": "4.2.5",
"@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.2",
"@types/cors": "2.8.6",
"@types/express": "4.17.2",
"@types/express": "4.17.3",
"@types/http-proxy": "1.17.2",
"@types/mocha": "5.2.7",
"@types/node": "12.12.9",
"@types/mocha": "7.0.2",
"@types/node": "13.9.1",
"@types/request-promise": "4.1.45",
"@types/sinon": "7.5.0",
"@types/sinon": "7.5.2",
"@types/sinon-chai": "3.2.3",
"@types/supertest": "2.0.8",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"concurrently": "5.0.0",
"mocha": "6.2.2",
"concurrently": "5.1.0",
"mocha": "7.1.0",
"nodemon": "1.19.4",
"nyc": "14.1.1",
"nyc": "15.0.0",
"rimraf": "3.0.0",
"sinon": "7.5.0",
"sinon-chai": "3.3.0",
"sinon": "9.0.1",
"sinon-chai": "3.5.0",
"supertest": "4.0.2",
"ts-node": "8.5.2",
"tslint": "5.20.1",
"typescript": "3.7.5"
"ts-node": "8.6.2",
"tslint": "6.1.0",
"typescript": "3.8.3"
}
}
34 changes: 17 additions & 17 deletions examples/mongoose/package.json
Expand Up @@ -36,34 +36,34 @@
"express": "4.17.1",
"express-session": "1.17.0",
"method-override": "^3.0.0",
"mongoose": "5.7.11",
"mongoose": "5.9.4",
"serve-static": "^1.13.1",
"cross-env": "6.0.3"
"cross-env": "7.0.2"
},
"devDependencies": {
"@types/chai": "4.2.5",
"@types/chai-as-promised": "^7.1.0",
"@types/express": "^4.17.2",
"@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.2",
"@types/express": "4.17.3",
"@types/http-proxy": "^1.17.1",
"@types/mocha": "5.2.7",
"@types/mongoose": "5.5.32",
"@types/node": "12.12.9",
"@types/mocha": "7.0.2",
"@types/mongoose": "5.7.6",
"@types/node": "13.9.1",
"@types/request-promise": "^4.1.42",
"@types/sinon": "^7.5.0",
"@types/sinon": "7.5.2",
"@types/sinon-chai": "3.2.3",
"@types/supertest": "2.0.8",
"chai": "4.2.0",
"chai-as-promised": "^7.1.1",
"concurrently": "^5.0.0",
"mocha": "^6.2.2",
"concurrently": "5.1.0",
"mocha": "7.1.0",
"nodemon": "1.19.4",
"nyc": "^14.1.1",
"nyc": "15.0.0",
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"sinon-chai": "^3.3.0",
"sinon": "9.0.1",
"sinon-chai": "3.5.0",
"supertest": "4.0.2",
"ts-node": "8.5.2",
"tslint": "5.20.1",
"typescript": "3.7.5"
"ts-node": "8.6.2",
"tslint": "6.1.0",
"typescript": "3.8.3"
}
}
12 changes: 12 additions & 0 deletions examples/multer/.mocharc.js
@@ -0,0 +1,12 @@
module.exports = {
require: [
'ts-node/register/transpile-only',
'tsconfig-paths/register',
'scripts/mocha/register'
],
recursive: true,
reporter: 'dot',
spec: [
'**/*.spec.ts'
]
}
29 changes: 15 additions & 14 deletions examples/multer/package.json
Expand Up @@ -33,37 +33,38 @@
"body-parser": "1.19.0",
"cors": "2.8.5",
"compression": "1.7.4",
"concurrently": "5.0.0",
"cross-env": "7.0.2",
"concurrently": "5.1.0",
"cookie-parser": "1.4.4",
"express": "4.17.1",
"method-override": "3.0.0",
"node-uuid": "^1.4.8",
"ts-json-properties": "1.2.0"
},
"devDependencies": {
"@types/chai": "4.2.5",
"@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.2",
"@types/cors": "2.8.6",
"@types/express": "4.17.2",
"@types/express": "4.17.3",
"@types/http-proxy": "1.17.2",
"@types/mocha": "5.2.7",
"@types/node": "12.12.9",
"@types/mocha": "7.0.2",
"@types/node": "13.9.1",
"@types/request-promise": "4.1.45",
"@types/sinon": "7.5.0",
"@types/sinon": "7.5.2",
"@types/sinon-chai": "3.2.3",
"@types/supertest": "2.0.8",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"concurrently": "5.0.0",
"mocha": "6.2.2",
"concurrently": "5.1.0",
"mocha": "7.1.0",
"nodemon": "1.19.4",
"nyc": "14.1.1",
"nyc": "15.0.0",
"rimraf": "3.0.0",
"sinon": "7.5.0",
"sinon-chai": "3.3.0",
"sinon": "9.0.1",
"sinon-chai": "3.5.0",
"supertest": "4.0.2",
"ts-node": "8.5.2",
"tslint": "5.20.1",
"typescript": "3.7.5"
"ts-node": "8.6.2",
"tslint": "6.1.0",
"typescript": "3.8.3"
}
}
4 changes: 0 additions & 4 deletions examples/multer/src/controllers/upload/UploadCtrl.ts
Expand Up @@ -11,12 +11,8 @@ export class UploadController {
@Put("/")
@Status(201)
@Responses("201", {description: "Created"})
@Responses("400", {description: "Bad Request"})
@MulterOptions({dest: `${process.cwd()}/.tmp`})
async add(@MultipartFile("file") file: Express.Multer.File): Promise<any> {

console.log("file: ", file);

return true;
}
}
Expand Up @@ -3,32 +3,25 @@ import {TestContext} from "@tsed/testing";
import {expect} from "chai";
import * as Path from "path";
import * as SuperTest from "supertest";
import {Test} from "supertest";
import {Server} from "../../../../src/Server";

describe("Upload", () => {

let request: SuperTest.SuperTest<Test>;
// bootstrap the express application
before(TestContext.bootstrap(Server));
before(TestContext.inject([ExpressApplication], (expressApplication: ExpressApplication) => {
this.app = expressApplication;
request = SuperTest(expressApplication);
}));
after(TestContext.reset);

describe("PUT /rest/upload", () => { // work if you enable the MultipartFileMiddlewareOverrided ;)
it("should return 400", (done) => {
SuperTest(this.app)
.put("/rest/upload")
describe("PUT /rest/upload", () => {
it("should return 201", async () => {
const response = await request.put("/rest/upload")
.attach("file", Path.join(__dirname, "/test.txt"))
.expect(400)
.end((err, res: any) => {
if (err) {
throw (err);
}

expect(res.text).to.eq("This should be thrown and seen on the test failure.");
.expect(201);

done();
});
expect(response.body).to.eq(true);
});
});
});
@@ -0,0 +1 @@
test
5 changes: 0 additions & 5 deletions examples/multer/test/mocha.opts

This file was deleted.

0 comments on commit e408a8c

Please sign in to comment.