1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-01 11:38:25 +01:00

Merge pull request #1168 from h3poteto/node/12

Update node version to 12.13.1 in CircleCI
This commit is contained in:
AkiraFukushima 2019-12-11 23:21:12 +09:00 committed by GitHub
commit ced6d267e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 22 deletions

View File

@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: node:10.16.0-stretch-slim
- image: node:12.13.1-buster-slim
working_directory: /var/opt/app
steps:
- checkout
@ -14,13 +14,13 @@ jobs:
- restore_cache:
name: Restoring cache - node_modules
keys:
- node_modules-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}
- node_modules-{{ arch }}-node12.13.1-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}
- run:
name: Install packages
command: npm install
- save_cache:
name: Saving cache - node_modules
key: node_modules-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}
key: node_modules-{{ arch }}-node12.13.1-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}
paths:
- node_modules
- run:

View File

@ -55,35 +55,45 @@ describe('Preferences/Appearance', () => {
App: App
}
})
ipcMain.once('update-preferences', (event: IpcMainEvent, config: any) => {
event.sender.send('response-update-preferences', config)
})
})
describe('load', () => {
it('loadAppearance', async () => {
ipcMain.once('get-preferences', (event: IpcMainEvent, _) => {
event.sender.send('response-get-preferences', {
appearance: {
theme: Theme.Dark.key,
fontSize: 15
}
describe('loadAppearance', () => {
beforeEach(() => {
ipcMain.once('get-preferences', (event: IpcMainEvent, _) => {
event.sender.send('response-get-preferences', {
appearance: {
theme: Theme.Dark.key,
fontSize: 15
}
})
})
})
await store.dispatch('Preferences/loadAppearance')
expect(store.state.Preferences.appearance.theme).toEqual(Theme.Dark.key)
expect(store.state.Preferences.appearance.fontSize).toEqual(15)
})
it('loadFonts', async () => {
ipcMain.once('list-fonts', (event: IpcMainEvent, _) => {
event.sender.send('response-list-fonts', ['my-font'])
it('should be loaded', async () => {
await store.dispatch('Preferences/loadAppearance')
expect(store.state.Preferences.appearance.theme).toEqual(Theme.Dark.key)
expect(store.state.Preferences.appearance.fontSize).toEqual(15)
})
})
describe('loadFonts', () => {
beforeEach(() => {
ipcMain.once('list-fonts', (event: IpcMainEvent, _) => {
event.sender.send('response-list-fonts', ['my-font'])
})
})
it('should be loaded', async () => {
await store.dispatch('Preferences/loadFonts')
expect(store.state.Preferences.fonts).toEqual([DefaultFonts[0], 'my-font'])
})
await store.dispatch('Preferences/loadFonts')
expect(store.state.Preferences.fonts).toEqual([DefaultFonts[0], 'my-font'])
})
})
describe('update', () => {
beforeEach(() => {
ipcMain.once('update-preferences', (event: IpcMainEvent, config: any) => {
event.sender.send('response-update-preferences', config)
})
})
it('updateTheme', async () => {
await store.dispatch('Preferences/updateTheme', Theme.Dark.key)
expect(store.state.Preferences.appearance.theme).toEqual(Theme.Dark.key)