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 8686 "@storybook/react" : " ^3.3.3" ,
8787 "@types/electron-is-dev" : " ^0.3.0" ,
8888 "@types/electron-store" : " ^1.2.0" ,
89- "@types/jest" : " ^21.1.8 " ,
89+ "@types/jest" : " ^22.0.1 " ,
9090 "@types/mousetrap" : " ^1.6.0" ,
9191 "@types/react" : " ^16.0.34" ,
9292 "@types/react-dom" : " ^16.0.3" ,
9898 "electron-builder" : " ^19.52.1" ,
9999 "fuse-box" : " ^3.0.2" ,
100100 "husky" : " ^0.14.3" ,
101- "jest" : " ^21.2.1 " ,
101+ "jest" : " ^22.0.4 " ,
102102 "jest-expect-contain-deep" : " ^1.0.1" ,
103103 "lint-staged" : " ^6.0.0" ,
104104 "npm-run-all" : " ^4.1.2" ,
105105 "prettier" : " ^1.9.2" ,
106106 "react-powerplug" : " ^0.1.2" ,
107107 "react-test-renderer" : " ^16.2.0" ,
108- "ts-jest" : " ^21.2.4 " ,
108+ "ts-jest" : " ^22.0.0 " ,
109109 "ts-loader" : " ^3.2.0" ,
110110 "ts-node" : " ^4.1.0" ,
111111 "tslint" : " ^5.8.0" ,
Original file line number Diff line number Diff line change 11import { isLinux , isMac , isWindows } from "./platform"
22
33test ( "detects linux" , ( ) => {
4- process . platform = "linux"
4+ Object . defineProperty ( process , " platform" , { value : "linux" } )
55 expect ( isLinux ( ) ) . toBe ( true )
66} )
77
88test ( "detects windows" , ( ) => {
9- process . platform = "win32"
9+ Object . defineProperty ( process , " platform" , { value : "win32" } )
1010 expect ( isWindows ( ) ) . toBe ( true )
1111} )
1212
1313test ( "detects mac" , ( ) => {
14- process . platform = "darwin"
14+ Object . defineProperty ( process , " platform" , { value : "darwin" } )
1515 expect ( isMac ( ) ) . toBe ( true )
1616} )
You can’t perform that action at this time.
0 commit comments