Skip to content

Commit f8e6d6f

Browse files
committed
test(refactor): add user cleanup for After hook
1 parent 6db787f commit f8e6d6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/e2e/utils/fileHelper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const path = require('path')
33
const { getWebDavUrl, makeApiRequest, getAuthHeaders } = require('./apiHelper')
44
const config = require('../config')
55

6-
const userDetails = []
6+
let userDetails = []
77

88
const readLocalFileContent = (fileName) => {
99
const filePath = path.join(config.assets, fileName)
@@ -27,6 +27,7 @@ const cleanupResources = async () => {
2727
for (const userDetail of userDetails) {
2828
await deleteResource(userDetail.user, userDetail.fileName)
2929
}
30+
userDetails = []
3031
}
3132

3233
module.exports = { uploadFile, cleanupResources }

0 commit comments

Comments
 (0)