👕 Fix linter errors

This commit is contained in:
Antonio Scandurra
2016-05-24 09:28:00 +02:00
parent c7f4b33eb8
commit 4f1efe6ef6
2 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ describe("FileRecoveryService", () => {
let mockWindow, recoveryService, recoveryDirectory
beforeEach(() => {
mockWindow = new Emitter
mockWindow = new Emitter()
recoveryDirectory = temp.mkdirSync()
recoveryService = new FileRecoveryService(recoveryDirectory)
})
@@ -32,7 +32,7 @@ describe("FileRecoveryService", () => {
})
it("creates many recovery files and deletes them when many windows attempt to save the same file", () => {
const anotherMockWindow = new Emitter
const anotherMockWindow = new Emitter()
let filePath = temp.path()
fs.writeFileSync(filePath, "some content")

View File

@@ -8,8 +8,8 @@ import fs from 'fs-plus'
export default class FileRecoveryService {
constructor (recoveryDirectory) {
this.recoveryDirectory = recoveryDirectory
this.recoveryPathsByWindowAndFilePath = new WeakMap
this.crashListeners = new WeakSet
this.recoveryPathsByWindowAndFilePath = new WeakMap()
this.crashListeners = new WeakSet()
}
start () {
@@ -29,7 +29,7 @@ export default class FileRecoveryService {
fs.writeFileSync(recoveryPath, fs.readFileSync(path))
if (!this.recoveryPathsByWindowAndFilePath.has(window)) {
this.recoveryPathsByWindowAndFilePath.set(window, new Map)
this.recoveryPathsByWindowAndFilePath.set(window, new Map())
}
this.recoveryPathsByWindowAndFilePath.get(window).set(path, recoveryPath)