Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Update dependency @types/supertest to v6 (#49)
Browse files Browse the repository at this point in the history
* Update dependency @types/supertest to v6

* Added Record<string, string> instead of object

* Small dockerfile cleanup

* Bumped up the version

* Bumped up version in package lock as well

* Bumped up the ver

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dc-andysign <andrei.baloiu@gmail.com>
  • Loading branch information
renovate[bot] and dc-andysign authored Jan 5, 2024
1 parent b5fed00 commit 6a05aec
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN npm ci
COPY . .
RUN npm run build

# service
# service
FROM node:lts-alpine as service

WORKDIR /dscp-hyproof-api
Expand All @@ -31,4 +31,4 @@ RUN npm install @digicatapult/dscp-process-management@latest
COPY --from=builder /dscp-hyproof-api/build ./build

EXPOSE 80
CMD [ "npm", "start" ]
CMD [ "npm", "start" ]
36 changes: 22 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digicatapult/dscp-hyproof-api",
"version": "0.7.16",
"version": "0.7.17",
"description": "An OpenAPI API service for DSCP",
"main": "src/index.ts",
"scripts": {
Expand Down Expand Up @@ -42,7 +42,7 @@
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.6",
"@types/sinon": "^17.0.2",
"@types/supertest": "^2.0.16",
"@types/supertest": "^6.0.2",
"@types/swagger-ui-express": "^4.1.6",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.17.0",
Expand Down
10 changes: 7 additions & 3 deletions test/helpers/routeHelper.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import request from 'supertest'
import express from 'express'

export const get = async (app: express.Express, endpoint: string, headers: object = {}): Promise<request.Test> => {
export const get = async (
app: express.Express,
endpoint: string,
headers: Record<string, string> = {}
): Promise<request.Test> => {
return request(app).get(endpoint).set(headers)
}

export const post = async (
app: express.Express,
endpoint: string,
body: object,
headers: object = {}
headers: Record<string, string> = {}
): Promise<request.Test> => {
return request(app).post(endpoint).send(body).set(headers)
}
Expand All @@ -18,7 +22,7 @@ export const put = async (
app: express.Express,
endpoint: string,
body: object,
headers: object = {}
headers: Record<string, string> = {}
): Promise<request.Test> => {
return request(app).put(endpoint).send(body).set(headers)
}
Expand Down

0 comments on commit 6a05aec

Please sign in to comment.