Skip to content
Snippets Groups Projects
Commit a63cb889 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: fix broken tests

parent 515ff317
No related branches found
No related tags found
No related merge requests found
const { expect } = require('chai')
const { expect, assert } = require('chai')
const fs = require('fs')
const { assert } = require('console')
const express = require('express')
const got = require('got')
const sinon = require('sinon')
......
......@@ -58,7 +58,7 @@ router.delete('/pluginPermissions/:pluginKey', async (req, res) => {
const newPermission = {}
const permittedCsp = req.session.permittedCsp || {}
for (const key in permittedCsp) {
if (!pluginKey !== key) {
if (pluginKey !== key) {
newPermission[key] = permittedCsp[key]
}
}
......
......@@ -3,10 +3,7 @@ const app = require('express')()
const sinon = require('sinon')
const { stub, spy } = require('sinon')
const { default: got } = require('got/dist/source')
const { expect } = require('chai')
const { assert } = require('console')
const { expect, assert } = require('chai')
const sessionObj = {
permittedCspVal: {},
......@@ -140,7 +137,7 @@ describe('> user/index.js', () => {
'foo': 'bar',
'buzz': 'lightyear'
}
before(() => {
beforeEach(() => {
sessionObj.permittedCspVal = prevVal
})
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment