Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TannerBrunscheon committed Apr 24, 2018
1 parent bef956f commit 291ddd0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 1 addition & 5 deletions app/renderer/reducers/theme-wholesale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ export default function themeWholesale(
let newState = state
const themename = action.themename
let newTheme
if (themename !== 'light' && themename !== 'dark') {
newTheme = state.themes.get(themename)
} else {
newTheme = map.get(themename)
}
newTheme = themename !== 'light' && themename !== 'dark' ? state.themes.get(themename) : map.get(themename)
if (newTheme) {
newState = newState.set('themeName', action.themename)
newState = newState.set('themeProperties', newTheme)
Expand Down
2 changes: 2 additions & 0 deletions test/renderer/components/settingsmodal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ describe('settingsModal', function() {
changeSetting = sinon.spy()
onTabToggle = sinon.spy()
changeTheme = sinon.spy()
addTheme = sinon.spy()
playWithTheme =sinon.spy()
wrapper = shallow(
<SettingsModal.SettingsModal
visible={true}
Expand Down
7 changes: 3 additions & 4 deletions test/renderer/components/theme.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { SettingsFactory } from '../../../app/renderer/models/settings'
import { Map } from 'immutable'
import * as themes from '../../../app/renderer/stylesheets/thememaps/themes'
import * as AddModal from '../../../app/renderer/components/addmodal'
import {backup} from "../../../app/renderer/stylesheets/thememaps/themes";

use(chaiEnzyme())
use(sinonChai)
Expand All @@ -34,7 +33,7 @@ describe('theme component', function() {
sandbox = sinon.createSandbox()

wrapper = shallow(
<Theme properties={backup}>
<Theme properties={themes.backup}>
<div />
</Theme>
)
Expand All @@ -58,7 +57,7 @@ describe('theme component', function() {
sandbox = sinon.createSandbox()

wrapper = shallow(
<Theme properties={backup}>
<Theme properties={themes.backup}>
<div />
</Theme>
)
Expand All @@ -68,7 +67,7 @@ describe('theme component', function() {
})

it('should not properties', function() {
wrapper.setProps({ properties: backup })
wrapper.setProps({ properties: themes.backup })
expect(instance.handleNewProperties).to.not.be.called
})

Expand Down

0 comments on commit 291ddd0

Please sign in to comment.