Skip to content

Commit 86bb137

Browse files
authored
NPM Package Updates (#472)
* start with ALL and work backwards * reset * try iiif/helpers * try cors * try dompurify * try dotenv and jwt * try marked and mongo * try jest * nodemon and sinon * try maria, which seems like it breaks * try maria again with this minor refactor * try jsdom, which we are pretty sure breaks. * ah ok, no refactor for that, so we have to lock it in at 27 * try latest node and npm lts * ah I see! Let's try the version bundled with nvm * Now how about after telling the server it's ok to use the latest version instead of the bundled version in nvm. * mkay how about a new package-lock.json built around that? * Yeah I was afraid of that * jsdom is locked down now. refactor complete. * update nodemailer
1 parent a07b0d4 commit 86bb137

6 files changed

Lines changed: 932 additions & 906 deletions

File tree

auth/__tests__/auth_unit_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const TIME_OUT = process.env.TEST_TIMEOUT ?? 5000
1313

1414
describe("auth0Middleware #auth_test", () => {
1515
it(
16-
"should return 400 without Authorization Header",
16+
"should return 401 without Authorization Header",
1717
async () => {
1818
const res = await request(app).get("/protected-route")
19-
expect(res.status).toBe(400)
19+
expect(res.status).toBe(401)
2020
},
2121
TIME_OUT
2222
)

classes/User/__tests__/unit.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ describe("GET /my/profile #user_class", () => {
9090
expect(response.body.userData).toEqual({name: "VOO"})
9191
})
9292

93-
it("should return 400 if user is not authenticated (no authorization header)", async () => {
93+
it("should return 401 if user is not authenticated (no authorization header)", async () => {
9494
const appWithoutAuth = express()
9595
appWithoutAuth.use("/my", privateProfileRouter)
9696
const response = await request(appWithoutAuth).get("/my/profile")
97-
expect(response.status).toBe(400)
97+
expect(response.status).toBe(401)
9898
})
9999

100100
it("should return 401 if user is not authenticated (invalid authorization header)", async () => {
@@ -138,11 +138,11 @@ describe("GET /my/projects #user_class", () => {
138138
}
139139
}
140140
})
141-
it("should return 400 if user is not authenticated (no authorization header)", async () => {
141+
it("should return 401 if user is not authenticated (no authorization header)", async () => {
142142
const appWithoutAuth = express()
143143
appWithoutAuth.use("/my", privateProfileRouter)
144144
const response = await request(appWithoutAuth).get("/my/profile")
145-
expect(response.status).toBe(400)
145+
expect(response.status).toBe(401)
146146
})
147147

148148
it("should return 401 if user is not authenticated (invalid authorization header)", async () => {

database/maria/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* https://github.com/thehabes
77
*/
88

9-
import mariadb from 'mariadb'
9+
import * as mariadb from 'mariadb'
1010

1111
class DatabaseController {
1212
constructor(connect=false) {

0 commit comments

Comments
 (0)