File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,15 @@ describe("Matcher", () => {
442
442
describe ( "when used it should create a JSON object" , ( ) => {
443
443
it ( "should not fail" , ( ) => {
444
444
expect ( boolean ( ) ) . to . be . an ( "object" )
445
+ expect ( boolean ( ) . contents ) . to . equal ( true )
446
+ } )
447
+ it ( "should not fail with value=false" , ( ) => {
448
+ expect ( boolean ( false ) ) . to . be . an ( "object" )
449
+ expect ( boolean ( false ) . contents ) . to . equal ( false )
450
+ } )
451
+ it ( "should not fail with value=true" , ( ) => {
452
+ expect ( boolean ( true ) ) . to . be . an ( "object" )
453
+ expect ( boolean ( true ) . contents ) . to . equal ( true )
445
454
} )
446
455
} )
447
456
} )
Original file line number Diff line number Diff line change @@ -248,8 +248,8 @@ export function integer(int?: number) {
248
248
/**
249
249
* Boolean Matcher.
250
250
*/
251
- export function boolean ( ) {
252
- return somethingLike < boolean > ( true )
251
+ export function boolean ( value : boolean = true ) {
252
+ return somethingLike < boolean > ( value )
253
253
}
254
254
255
255
// Convenience alias'
You can’t perform that action at this time.
0 commit comments