File tree 3 files changed +100
-8
lines changed
3 files changed +100
-8
lines changed Original file line number Diff line number Diff line change @@ -175,13 +175,6 @@ export const $: Shell & Options = new Proxy<Shell & Options>(
175
175
}
176
176
)
177
177
178
- function substitute ( arg : ProcessPromise | any ) {
179
- if ( arg ?. stdout ) {
180
- return arg . stdout . replace ( / \n $ / , '' )
181
- }
182
- return `${ arg } `
183
- }
184
-
185
178
type Resolve = ( out : ProcessOutput ) => void
186
179
type IO = StdioPipe | StdioNull
187
180
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import './experimental.test.js'
19
19
import './extra.test.js'
20
20
import './global.test.js'
21
21
import './goods.test.js'
22
+ import './index.test.js'
22
23
import './package.test.js'
23
- import './win32.test.js'
24
24
import './util.test.js'
25
+ import './win32.test.js'
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // https://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import assert from 'node:assert'
16
+ import { describe , test } from 'node:test'
17
+ import {
18
+ nothrow ,
19
+ quiet ,
20
+ $ ,
21
+ log ,
22
+ cd ,
23
+ kill ,
24
+ ProcessOutput ,
25
+ ProcessPromise ,
26
+ defaults ,
27
+ minimist ,
28
+ chalk ,
29
+ fs ,
30
+ which ,
31
+ YAML ,
32
+ ssh ,
33
+ ps ,
34
+ quote ,
35
+ quotePowerShell ,
36
+ within ,
37
+ argv ,
38
+ os ,
39
+ updateArgv ,
40
+ globby ,
41
+ glob ,
42
+ sleep ,
43
+ fetch ,
44
+ echo ,
45
+ question ,
46
+ stdin ,
47
+ retry ,
48
+ expBackoff ,
49
+ spinner ,
50
+ path ,
51
+ } from '../build/index.js'
52
+
53
+ describe ( 'index' , ( ) => {
54
+ test ( 'has proper exports' , ( ) => {
55
+ // index
56
+ assert ( nothrow )
57
+ assert ( quiet )
58
+
59
+ // core
60
+ assert ( $ )
61
+ assert ( ProcessOutput )
62
+ assert ( ProcessPromise )
63
+ assert ( cd )
64
+ assert ( log )
65
+ assert ( kill )
66
+ assert ( defaults )
67
+ assert ( within )
68
+
69
+ // goods
70
+ assert ( argv )
71
+ assert ( os )
72
+ assert ( updateArgv )
73
+ assert ( globby )
74
+ assert ( glob )
75
+ assert ( sleep )
76
+ assert ( fetch )
77
+ assert ( echo )
78
+ assert ( question )
79
+ assert ( stdin )
80
+ assert ( retry )
81
+ assert ( expBackoff )
82
+ assert ( spinner )
83
+ assert ( path )
84
+
85
+ // vendor
86
+ assert ( minimist )
87
+ assert ( chalk )
88
+ assert ( fs )
89
+ assert ( which )
90
+ assert ( YAML )
91
+ assert ( ssh )
92
+ assert ( ps )
93
+
94
+ // utils
95
+ assert ( quote )
96
+ assert ( quotePowerShell )
97
+ } )
98
+ } )
You can’t perform that action at this time.
0 commit comments