Skip to content

Commit

Permalink
fix: test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
meowtec committed Aug 21, 2022
1 parent 0112bcb commit 053cee5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions modules/__tests__/renderer/job-runner.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @jest-environment jsdom
*/
import '../_tools/before-test'

import * as path from 'path'
Expand Down
3 changes: 3 additions & 0 deletions modules/__tests__/renderer/store.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @jest-environment jsdom
*/
import '../_tools/before-test'

import { createStore } from '../../renderer/store/store'
Expand Down
2 changes: 1 addition & 1 deletion modules/renderer/store/job-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class JobRunner {
const optimized = await imagineAPI.optimize(task)
store.dispatch(actions.taskOptimizeSuccess(task.id, optimized))
} catch (err) {
imagineAPI.logger.error(err)
imagineAPI?.logger.error(err)
store.dispatch(actions.taskOptimizeFail(task.id))
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/renderer/store/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const saveOptions = (options: IStorageContent) => {
try {
localStorage.setItem(key, JSON.stringify(options))
} catch (e) {
imagineAPI.logger.error(`Failed to set options to localStorage, ${e}`)
imagineAPI?.logger.error(`Failed to set options to localStorage, ${e}`)
}
}

0 comments on commit 053cee5

Please sign in to comment.