mirror of
https://github.com/status-im/codimd.git
synced 2025-01-12 15:34:17 +00:00
refactor: fix lint on test/csp.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
parent
94703dc8b8
commit
a7b4c30134
10
test/csp.js
10
test/csp.js
@ -43,7 +43,7 @@ describe('Content security policies', function () {
|
||||
|
||||
// beginnging Tests
|
||||
it('Disable CDN', function () {
|
||||
let testconfig = defaultConfig
|
||||
const testconfig = defaultConfig
|
||||
testconfig.useCDN = false
|
||||
mock('../lib/config', testconfig)
|
||||
csp = mock.reRequire('../lib/csp')
|
||||
@ -57,7 +57,7 @@ describe('Content security policies', function () {
|
||||
})
|
||||
|
||||
it('Disable Google Analytics', function () {
|
||||
let testconfig = defaultConfig
|
||||
const testconfig = defaultConfig
|
||||
testconfig.csp.addGoogleAnalytics = false
|
||||
mock('../lib/config', testconfig)
|
||||
csp = mock.reRequire('../lib/csp')
|
||||
@ -66,7 +66,7 @@ describe('Content security policies', function () {
|
||||
})
|
||||
|
||||
it('Disable Disqus', function () {
|
||||
let testconfig = defaultConfig
|
||||
const testconfig = defaultConfig
|
||||
testconfig.csp.addDisqus = false
|
||||
mock('../lib/config', testconfig)
|
||||
csp = mock.reRequire('../lib/csp')
|
||||
@ -79,7 +79,7 @@ describe('Content security policies', function () {
|
||||
})
|
||||
|
||||
it('Set ReportURI', function () {
|
||||
let testconfig = defaultConfig
|
||||
const testconfig = defaultConfig
|
||||
testconfig.csp.reportURI = 'https://example.com/reportURI'
|
||||
mock('../lib/config', testconfig)
|
||||
csp = mock.reRequire('../lib/csp')
|
||||
@ -88,7 +88,7 @@ describe('Content security policies', function () {
|
||||
})
|
||||
|
||||
it('Set own directives', function () {
|
||||
let testconfig = defaultConfig
|
||||
const testconfig = defaultConfig
|
||||
mock('../lib/config', defaultConfig)
|
||||
csp = mock.reRequire('../lib/csp')
|
||||
const unextendedCSP = csp.computeDirectives()
|
||||
|
Loading…
x
Reference in New Issue
Block a user