Skip to content

Commit b25f20e

Browse files
Eric Prud'hommeauxRubenVerborgh
authored andcommitted
~ make tests finish
under the supreme direction of Ruben Verborgh
1 parent 0957f9a commit b25f20e

File tree

6 files changed

+76
-149
lines changed

6 files changed

+76
-149
lines changed

package-lock.json

Lines changed: 62 additions & 138 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"dirty-chai": "^1.2.2",
9090
"hippie": "^0.5.0",
9191
"localstorage-memory": "^1.0.2",
92-
"mocha": "^3.2.0",
92+
"mocha": "^5.1.1",
9393
"nock": "^9.0.14",
9494
"node-mocks-http": "^1.5.6",
9595
"nyc": "^10.1.2",

test/integration/authentication-oidc-test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ chai.use(require('dirty-chai'))
2121
// In this test we always assume that we are Alice
2222

2323
describe('Authentication API (OIDC)', () => {
24-
let alice, aliceServer
25-
let bob, bobServer
24+
let alice, bob
2625

2726
let aliceServerUri = 'https://localhost:7000'
2827
let aliceWebId = 'https://localhost:7000/profile/card#me'
@@ -81,8 +80,8 @@ describe('Authentication API (OIDC)', () => {
8180
})
8281

8382
after(() => {
84-
if (aliceServer) aliceServer.close()
85-
if (bobServer) bobServer.close()
83+
alicePod.close()
84+
bobPod.close()
8685
fs.removeSync(path.join(aliceDbPath, 'oidc/users'))
8786
fs.removeSync(path.join(aliceRootPath, 'index.html'))
8887
fs.removeSync(path.join(aliceRootPath, 'index.html.acl'))

test/integration/capability-discovery-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const expect = require('chai').expect
66
// In this test we always assume that we are Alice
77

88
describe('API', () => {
9-
let alice, aliceServer
9+
let alice
1010

1111
let aliceServerUri = 'https://localhost:5000'
1212
let configPath = path.join(__dirname, '../../config')
@@ -47,7 +47,7 @@ describe('API', () => {
4747
})
4848

4949
after(() => {
50-
if (aliceServer) aliceServer.close()
50+
alicePod.close()
5151
fs.removeSync(path.join(aliceRootPath, 'index.html'))
5252
fs.removeSync(path.join(aliceRootPath, 'index.html.acl'))
5353
})

test/integration/http-test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,11 @@ describe('HTTP APIs', function () {
472472

473473
it('should delete a new and empty container', function (done) {
474474
server.delete('/delete-test-empty-container/')
475-
.expect(function () {
476-
// Ensure container was deleted
475+
.end(() => {
477476
server.get('/delete-test-empty-container/')
478477
.expect(404)
478+
.end(done)
479479
})
480-
.end(done)
481480
})
482481

483482
after(function () {

0 commit comments

Comments
 (0)