This repository was archived by the owner on Jun 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +336
-208
lines changed
src/shared/utils/platform Expand file tree Collapse file tree 3 files changed +336
-208
lines changed Original file line number Diff line number Diff line change 86
86
"@storybook/react" : " ^3.3.3" ,
87
87
"@types/electron-is-dev" : " ^0.3.0" ,
88
88
"@types/electron-store" : " ^1.2.0" ,
89
- "@types/jest" : " ^21.1.8 " ,
89
+ "@types/jest" : " ^22.0.1 " ,
90
90
"@types/mousetrap" : " ^1.6.0" ,
91
91
"@types/react" : " ^16.0.34" ,
92
92
"@types/react-dom" : " ^16.0.3" ,
98
98
"electron-builder" : " ^19.52.1" ,
99
99
"fuse-box" : " ^3.0.2" ,
100
100
"husky" : " ^0.14.3" ,
101
- "jest" : " ^21.2.1 " ,
101
+ "jest" : " ^22.0.4 " ,
102
102
"jest-expect-contain-deep" : " ^1.0.1" ,
103
103
"lint-staged" : " ^6.0.0" ,
104
104
"npm-run-all" : " ^4.1.2" ,
105
105
"prettier" : " ^1.9.2" ,
106
106
"react-powerplug" : " ^0.1.2" ,
107
107
"react-test-renderer" : " ^16.2.0" ,
108
- "ts-jest" : " ^21.2.4 " ,
108
+ "ts-jest" : " ^22.0.0 " ,
109
109
"ts-loader" : " ^3.2.0" ,
110
110
"ts-node" : " ^4.1.0" ,
111
111
"tslint" : " ^5.8.0" ,
Original file line number Diff line number Diff line change 1
1
import { isLinux , isMac , isWindows } from "./platform"
2
2
3
3
test ( "detects linux" , ( ) => {
4
- process . platform = "linux"
4
+ Object . defineProperty ( process , " platform" , { value : "linux" } )
5
5
expect ( isLinux ( ) ) . toBe ( true )
6
6
} )
7
7
8
8
test ( "detects windows" , ( ) => {
9
- process . platform = "win32"
9
+ Object . defineProperty ( process , " platform" , { value : "win32" } )
10
10
expect ( isWindows ( ) ) . toBe ( true )
11
11
} )
12
12
13
13
test ( "detects mac" , ( ) => {
14
- process . platform = "darwin"
14
+ Object . defineProperty ( process , " platform" , { value : "darwin" } )
15
15
expect ( isMac ( ) ) . toBe ( true )
16
16
} )
You can’t perform that action at this time.
0 commit comments