mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-22 22:22:12 +00:00
fixed eslint error & integrated with prettier as well as formatted the whole codebase (#3450)
This commit is contained in:
@@ -6,14 +6,17 @@ global.window = document.defaultView
|
||||
global.navigator = window.navigator
|
||||
|
||||
const Storage = require('dom-storage')
|
||||
const localStorage = window.localStorage = global.localStorage = new Storage(null, { strict: true })
|
||||
const localStorage = (window.localStorage = global.localStorage = new Storage(
|
||||
null,
|
||||
{ strict: true }
|
||||
))
|
||||
const path = require('path')
|
||||
const TestDummy = require('../fixtures/TestDummy')
|
||||
const sander = require('sander')
|
||||
const os = require('os')
|
||||
const storagePath = path.join(os.tmpdir(), 'test/find-storage')
|
||||
|
||||
test.beforeEach((t) => {
|
||||
test.beforeEach(t => {
|
||||
t.context.storage = TestDummy.dummyStorage(storagePath)
|
||||
localStorage.setItem('storages', JSON.stringify([t.context.storage.cache]))
|
||||
})
|
||||
@@ -26,7 +29,7 @@ test('findStorage() should return a correct storage path(string)', t => {
|
||||
t.is(findStorage(storageKey).path, storagePath)
|
||||
})
|
||||
|
||||
test.after(function after () {
|
||||
test.after(function after() {
|
||||
localStorage.clear()
|
||||
sander.rimrafSync(storagePath)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user