refactor: fix lint on test/csp.js

Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
BoHong Li 2019-08-04 23:20:52 +08:00
parent 94703dc8b8
commit a7b4c30134
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38

View File

@ -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()