@@ -144,17 +144,18 @@ describe("defaults", () => {
144
144
145
145
describe ( "defaults.options" , ( ) => {
146
146
it ( "should use the default options" , ( ) => {
147
- chaiExec . defaults . options = { env : { foo : "Hello" , bar : "world" } } ;
147
+ chaiExec . defaults . options = { env : { ... process . env , foo : "Hello" , bar : "world" } } ;
148
148
let cli = chaiExec ( "test/fixtures/bin/echo-env foo bar" ) ;
149
149
150
150
cli . command . should . equal ( "test/fixtures/bin/echo-env" ) ;
151
151
cli . args . should . deep . equal ( [ "foo" , "bar" ] ) ;
152
+ cli . stdout . should . equal ( "foo: Hello\nbar: world\n" ) ;
152
153
cli . should . have . stdout ( "foo: Hello\nbar: world\n" ) ;
153
154
} ) ;
154
155
155
156
it ( "should use the default command and options" , ( ) => {
156
157
chaiExec . defaults . command = "test/fixtures/bin/echo-env" ;
157
- chaiExec . defaults . options = { env : { foo : "Hello" , bar : "world" } } ;
158
+ chaiExec . defaults . options = { env : { ... process . env , foo : "Hello" , bar : "world" } } ;
158
159
let cli = chaiExec ( "foo bar" ) ;
159
160
160
161
cli . command . should . equal ( "test/fixtures/bin/echo-env" ) ;
@@ -165,7 +166,7 @@ describe("defaults", () => {
165
166
it ( "should use the default command, args, and options" , ( ) => {
166
167
chaiExec . defaults . command = "test/fixtures/bin/echo-env" ;
167
168
chaiExec . defaults . args = "foo bar" ;
168
- chaiExec . defaults . options = { env : { foo : "Hello" , bar : "world" } } ;
169
+ chaiExec . defaults . options = { env : { ... process . env , foo : "Hello" , bar : "world" } } ;
169
170
let cli = chaiExec ( ) ;
170
171
171
172
cli . command . should . equal ( "test/fixtures/bin/echo-env" ) ;
@@ -175,7 +176,7 @@ describe("defaults", () => {
175
176
176
177
it ( "should append args to the default args, and options" , ( ) => {
177
178
chaiExec . defaults . args = [ "foo" , "bar" ] ;
178
- chaiExec . defaults . options = { env : { foo : "Hello" , bar : "world" , biz : "AAA" , baz : "BBB" } } ;
179
+ chaiExec . defaults . options = { env : { ... process . env , foo : "Hello" , bar : "world" , biz : "AAA" , baz : "BBB" } } ;
179
180
let cli = chaiExec ( [ "test/fixtures/bin/echo-env" , "biz" , "baz" ] ) ;
180
181
181
182
cli . command . should . equal ( "test/fixtures/bin/echo-env" ) ;
@@ -186,7 +187,7 @@ describe("defaults", () => {
186
187
it ( "should append args to the default command, args, and options" , ( ) => {
187
188
chaiExec . defaults . command = "test/fixtures/bin/echo-env" ;
188
189
chaiExec . defaults . args = "foo bar" ;
189
- chaiExec . defaults . options = { env : { foo : "Hello" , bar : "world" , biz : "AAA" , baz : "BBB" } } ;
190
+ chaiExec . defaults . options = { env : { ... process . env , foo : "Hello" , bar : "world" , biz : "AAA" , baz : "BBB" } } ;
190
191
let cli = chaiExec ( "biz baz" ) ;
191
192
192
193
cli . command . should . equal ( "test/fixtures/bin/echo-env" ) ;
0 commit comments