This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ const env = {
21
21
* Indicates that application is running on Macintosh.
22
22
*
23
23
* @static
24
- * @member {Boolean} module:utils/env~env#mac
24
+ * @member {Boolean} module:utils/env~env#isMac
25
25
*/
26
- mac : isMac ( userAgent )
26
+ isMac : isMac ( userAgent )
27
27
} ;
28
28
29
29
export default env ;
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export function parseKeystroke( keystroke ) {
108
108
* @returns {String } Keystroke text specific for the environment.
109
109
*/
110
110
export function getEnvKeystrokeText ( keystroke ) {
111
- if ( ! env . mac ) {
111
+ if ( ! env . isMac ) {
112
112
return keystroke ;
113
113
}
114
114
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ describe( 'Env', () => {
13
13
expect ( env ) . to . be . an ( 'object' ) ;
14
14
} ) ;
15
15
16
- describe ( 'mac ' , ( ) => {
16
+ describe ( 'isMac ' , ( ) => {
17
17
it ( 'is a boolean' , ( ) => {
18
- expect ( env . mac ) . to . be . a ( 'boolean' ) ;
18
+ expect ( env . isMac ) . to . be . a ( 'boolean' ) ;
19
19
} ) ;
20
20
} ) ;
21
21
22
- describe ( 'isMac' , ( ) => {
22
+ describe ( 'isMac() ' , ( ) => {
23
23
it ( 'returns true for macintosh UA strings' , ( ) => {
24
24
expect ( isMac ( 'macintosh' ) ) . to . be . true ;
25
25
expect ( isMac ( 'foo macintosh bar' ) ) . to . be . true ;
Original file line number Diff line number Diff line change @@ -103,15 +103,15 @@ describe( 'Keyboard', () => {
103
103
} ) ;
104
104
105
105
describe ( 'getEnvKeystrokeText' , ( ) => {
106
- const initialEnvMac = env . mac ;
106
+ const initialEnvMac = env . isMac ;
107
107
108
108
afterEach ( ( ) => {
109
- env . mac = initialEnvMac ;
109
+ env . isMac = initialEnvMac ;
110
110
} ) ;
111
111
112
112
describe ( 'on Macintosh' , ( ) => {
113
113
beforeEach ( ( ) => {
114
- env . mac = true ;
114
+ env . isMac = true ;
115
115
} ) ;
116
116
117
117
it ( 'replaces CTRL with ⌘' , ( ) => {
@@ -147,7 +147,7 @@ describe( 'Keyboard', () => {
147
147
148
148
describe ( 'on non–Macintosh' , ( ) => {
149
149
beforeEach ( ( ) => {
150
- env . mac = false ;
150
+ env . isMac = false ;
151
151
} ) ;
152
152
153
153
it ( 'does not touch anything' , ( ) => {
You can’t perform that action at this time.
0 commit comments