@@ -15,8 +15,8 @@ import {
15
15
} from 'vitest' ;
16
16
17
17
import { onHome , onTest } from '../src/actions' ;
18
- import { readFile , writeFile } from '../src/helpers' ;
19
18
import { NPMRC , REGISTRIES } from '../src/constants' ;
19
+ import { readFile , writeFile } from '../src/helpers' ;
20
20
21
21
const isWin = process . platform === 'win32' ;
22
22
@@ -98,7 +98,11 @@ it('nrm use <registry> local', async () => {
98
98
99
99
expect ( npmrc . registry ) . toBe ( REGISTRIES . cnpm . registry ) ;
100
100
101
- await coffee . spawn ( 'nrm' , [ 'current' ] , { shell : isWin } ) . expect ( 'stdout' , / c n p m / g) . expect ( 'code' , 0 ) . end ( ) ;
101
+ await coffee
102
+ . spawn ( 'nrm' , [ 'current' ] , { shell : isWin } )
103
+ . expect ( 'stdout' , / c n p m / g)
104
+ . expect ( 'code' , 0 )
105
+ . end ( ) ;
102
106
} ) ;
103
107
104
108
it ( 'nrm use <registry> local with user config' , async ( ) => {
@@ -115,7 +119,11 @@ it('nrm use <registry> local with user config', async () => {
115
119
expect ( npmrc . registry ) . toBe ( REGISTRIES . cnpm . registry ) ;
116
120
expect ( npmrc . abc ) . toBe ( '123' ) ;
117
121
118
- await coffee . spawn ( 'nrm' , [ 'current' ] , { shell : isWin } ) . expect ( 'stdout' , / c n p m / g) . expect ( 'code' , 0 ) . end ( ) ;
122
+ await coffee
123
+ . spawn ( 'nrm' , [ 'current' ] , { shell : isWin } )
124
+ . expect ( 'stdout' , / c n p m / g)
125
+ . expect ( 'code' , 0 )
126
+ . end ( ) ;
119
127
} ) ;
120
128
121
129
it ( 'nrm use without argument' , async ( ) => {
@@ -127,7 +135,9 @@ it('nrm use without argument', async () => {
127
135
} ) ;
128
136
} ) ;
129
137
130
- expect ( message ) . toBe ( `? Please select the registry you want to use (Use arrow keys)
138
+ expect (
139
+ message ,
140
+ ) . toBe ( `? Please select the registry you want to use (Use arrow keys)
131
141
${ isWin ? '>' : '❯' } npm
132
142
yarn
133
143
tencent
0 commit comments