Skip to content

Commit be614b5

Browse files
ci: fix tests
1 parent 03591d7 commit be614b5

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ jobs:
1919
node-version:
2020
- 20
2121

22+
services:
23+
postgres:
24+
image: postgres:14
25+
env:
26+
POSTGRES_PASSWORD: "changeit"
27+
options: >-
28+
--health-cmd pg_isready
29+
--health-interval 10s
30+
--health-timeout 5s
31+
--health-retries 5
32+
ports:
33+
- 5432:5432
34+
2235
steps:
2336
- name: Checkout repository
2437
uses: actions/checkout@v3

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"start": "node entrypoint.js",
1212
"dev": "node index.js",
13-
"test": "mocha --recursive",
13+
"test": "mocha --exit --recursive",
1414
"format": "prettier -w index.js src/ test/"
1515
},
1616
"dependencies": {

server/test/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("auth", () => {
2828
}),
2929
});
3030

31-
expect(res.status).to.eql(204);
31+
expect(res.status).to.eql(200);
3232

3333
const cookieHeader = res.headers.get("set-cookie");
3434
const sid = cookieHeader.substring(
@@ -104,7 +104,7 @@ describe("auth", () => {
104104
}),
105105
});
106106

107-
expect(res.status).to.eql(204);
107+
expect(res.status).to.eql(200);
108108

109109
const cookieHeader = res.headers.get("set-cookie");
110110
const sid = cookieHeader.substring(

0 commit comments

Comments
 (0)