Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
505 additions
and
1,080 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const ipcRenderer = { | ||
on: fn => fn, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`action::entities 创建一个保存 entities action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"user": Object { | ||
"1": Object { | ||
"id": 1, | ||
}, | ||
}, | ||
}, | ||
"type": "ENTITIES/SAVE", | ||
} | ||
`; | ||
|
||
exports[`action::entities 创建一个更新 entity 字段 action 1`] = ` | ||
Object { | ||
"payload": Array [ | ||
Object { | ||
"field": Array [ | ||
"users", | ||
"1", | ||
"id", | ||
], | ||
"value": 2, | ||
}, | ||
], | ||
"type": "ENTITIES/UPDATE", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`action::songs 创建一个 ban action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"channel": 1, | ||
"sid": 2, | ||
}, | ||
"type": "SONGS/BAN/REQUEST", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 current action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"sid": 1, | ||
}, | ||
"type": "SONGS/CURRENT", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 dislike action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"channel": 1, | ||
"sid": 2, | ||
}, | ||
"type": "SONGS/DISLIKE/REQUEST", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 like action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"channel": 1, | ||
"sid": 2, | ||
}, | ||
"type": "SONGS/LIKE/REQUEST", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 listen action 1`] = ` | ||
Object { | ||
"payload": 1, | ||
"type": "SONGS/LISTEN/REQUEST", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 mark action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"channel": 1, | ||
"sid": 2, | ||
}, | ||
"type": "SONGS/MARK/REQUEST", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 next action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"channel": 1, | ||
"sid": 2, | ||
}, | ||
"type": "SONGS/NEXT/REQUEST", | ||
} | ||
`; | ||
|
||
exports[`action::songs 创建一个 playedList action 1`] = ` | ||
Object { | ||
"payload": Object { | ||
"limit": 10, | ||
"start": 0, | ||
}, | ||
"type": "SONGS/PLAYED/REQUEST", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`action::users 创建一个 current action 1`] = ` | ||
Object { | ||
"payload": undefined, | ||
"type": "USER/CURRENT/REQUEST", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as actions from '../entities' | ||
|
||
describe('action::entities', () => { | ||
it('创建一个保存 entities action', () => { | ||
expect(actions.save({ | ||
user: { 1: { id: 1 } } | ||
})).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个更新 entity 字段 action', () => { | ||
expect(actions.update([{ | ||
field: ['users', '1', 'id'], value: 2, | ||
}])).toMatchSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import * as actions from '../songs' | ||
|
||
describe('action::songs', () => { | ||
it('创建一个 ban action', () => { | ||
expect(actions.ban(1, 2)).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 current action', () => { | ||
expect(actions.current({ sid: 1 })).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 like action', () => { | ||
expect(actions.like(1, 2)).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 dislike action', () => { | ||
expect(actions.dislike(1, 2)).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 listen action', () => { | ||
expect(actions.listen(1)).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 next action', () => { | ||
expect(actions.next(1, 2)).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 mark action', () => { | ||
expect(actions.mark(1, 2)).toMatchSnapshot() | ||
}) | ||
|
||
it('创建一个 playedList action', () => { | ||
expect(actions.playedList(0, 10)).toMatchSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as actions from '../users' | ||
|
||
describe('action::users', () => { | ||
it('创建一个 current action', () => { | ||
expect(actions.current()).toMatchSnapshot() | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.