Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug #1157

Merged
merged 10 commits into from
Oct 2, 2023
19 changes: 12 additions & 7 deletions test/server-bare.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ describe('Session specific tests', () => {
'http server initialization',
async () => {
await httpServer.initHttpServer(db, port)
axiosInstance
.post(`${restApi.uri.sessionCreate}?sessionId=${uuid}`)
},
testUtil.timeout.medium()
)
Expand All @@ -98,10 +96,17 @@ describe('Session specific tests', () => {
test(
'make sure there is still no session after index.html',
() =>
testQuery.selectCountFrom(db, 'SESSION').then((cnt) => {
expect(cnt).toBe(0)
}),
testUtil.timeout.medium()
testQuery
.selectCountFrom(db, 'SESSION')
.then((cnt) => {
expect(cnt).toBe(0)
})
.then(async () => {
await axiosInstance.post(
`${restApi.uri.sessionCreate}?sessionId=${uuid}`
)
}),
testUtil.timeout.short()
)

test(
Expand All @@ -117,7 +122,7 @@ describe('Session specific tests', () => {

test(
'make sure there is 1 session after previous call',
() =>
async () =>
testQuery.selectCountFrom(db, 'SESSION').then((cnt) => {
expect(cnt).toBe(1)
}),
Expand Down