@@ -78,11 +78,11 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
7878 describe ( ".toContainAllKeys" , ( ) => {
7979 context ( "when the object contains all the provided keys" , ( ) => {
8080 it ( "returns the assertion instance" , ( ) => {
81- const keys : Array < "myKey" | 2 > = [ "myKey" , 2 ] ;
81+ const keys : Array < keyof typeof TEST_OBJ > = [ "myKey" , 2 ] ;
8282 const test = new ObjectAssertion ( TEST_OBJ ) ;
8383
84- assert . deepStrictEqual ( test . toContainAllKeys ( [ "myKey" , 2 ] ) , test ) ;
85- assert . throws ( ( ) => test . not . toContainAllKeys ( keys ) , {
84+ assert . deepStrictEqual ( test . toContainAllKeys ( ... keys ) , test ) ;
85+ assert . throws ( ( ) => test . not . toContainAllKeys ( ... keys ) , {
8686 message : `Expected the object NOT to contain all the provided keys <${ keys } >` ,
8787 name : AssertionError . name ,
8888 } ) ;
@@ -94,11 +94,11 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
9494 const someKeys = [ "truthy" , "wrongKey" ] ;
9595 const test = new ObjectAssertion ( RECORD ) ;
9696
97- assert . throws ( ( ) => test . toContainAllKeys ( someKeys ) , {
97+ assert . throws ( ( ) => test . toContainAllKeys ( ... someKeys ) , {
9898 message : `Expected the object to contain all the provided keys <${ someKeys } >` ,
9999 name : AssertionError . name ,
100100 } ) ;
101- assert . deepStrictEqual ( test . not . toContainAllKeys ( someKeys ) , test ) ;
101+ assert . deepStrictEqual ( test . not . toContainAllKeys ( ... someKeys ) , test ) ;
102102 } ) ;
103103 } ) ;
104104 } ) ;
@@ -109,8 +109,8 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
109109 const someKeys = [ "truthy" , "wrongKey" ] ;
110110 const test = new ObjectAssertion ( RECORD ) ;
111111
112- assert . deepStrictEqual ( test . toContainAnyKeys ( someKeys ) , test ) ;
113- assert . throws ( ( ) => test . not . toContainAnyKeys ( someKeys ) , {
112+ assert . deepStrictEqual ( test . toContainAnyKeys ( ... someKeys ) , test ) ;
113+ assert . throws ( ( ) => test . not . toContainAnyKeys ( ... someKeys ) , {
114114 message : `Expected the object NOT to contain any of the provided keys <${ someKeys } >` ,
115115 name : AssertionError . name ,
116116 } ) ;
@@ -122,11 +122,11 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
122122 const wrongKeys = [ "wrongKey" , "randomKey" ] ;
123123 const test = new ObjectAssertion ( RECORD ) ;
124124
125- assert . throws ( ( ) => test . toContainAnyKeys ( wrongKeys ) , {
125+ assert . throws ( ( ) => test . toContainAnyKeys ( ... wrongKeys ) , {
126126 message : `Expected the object to contain at least one of the provided keys <${ wrongKeys } >` ,
127127 name : AssertionError . name ,
128128 } ) ;
129- assert . deepStrictEqual ( test . not . toContainAnyKeys ( wrongKeys ) , test ) ;
129+ assert . deepStrictEqual ( test . not . toContainAnyKeys ( ... wrongKeys ) , test ) ;
130130 } ) ;
131131 } ) ;
132132 } ) ;
@@ -165,8 +165,8 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
165165 const allValues = [ 0 , { innerObjKey : 1 , message : "inner value" } ] ;
166166 const test = new ObjectAssertion ( TEST_OBJ ) ;
167167
168- assert . deepStrictEqual ( test . toContainAllValues ( allValues ) , test ) ;
169- assert . throws ( ( ) => test . not . toContainAllValues ( allValues ) , {
168+ assert . deepStrictEqual ( test . toContainAllValues ( ... allValues ) , test ) ;
169+ assert . throws ( ( ) => test . not . toContainAllValues ( ... allValues ) , {
170170 message : `Expected the object NOT to contain all the provided values <${ allValues } >` ,
171171 name : AssertionError . name ,
172172 } ) ;
@@ -178,11 +178,11 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
178178 const someValues = [ 0 , { innerObjKey : 1 , message : "wrong inner value" } ] ;
179179 const test = new ObjectAssertion ( TEST_OBJ ) ;
180180
181- assert . throws ( ( ) => test . toContainAllValues ( someValues ) , {
181+ assert . throws ( ( ) => test . toContainAllValues ( ... someValues ) , {
182182 message : `Expected the object to contain all the provided values <${ someValues } >` ,
183183 name : AssertionError . name ,
184184 } ) ;
185- assert . deepStrictEqual ( test . not . toContainAllValues ( someValues ) , test ) ;
185+ assert . deepStrictEqual ( test . not . toContainAllValues ( ... someValues ) , test ) ;
186186 } ) ;
187187 } ) ;
188188 } ) ;
@@ -193,8 +193,8 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
193193 const someValues = [ 0 , { innerObjKey : 1 , message : "wrong inner value" } ] ;
194194 const test = new ObjectAssertion ( TEST_OBJ ) ;
195195
196- assert . deepStrictEqual ( test . toContainAnyValues ( someValues ) , test ) ;
197- assert . throws ( ( ) => test . not . toContainAnyValues ( someValues ) , {
196+ assert . deepStrictEqual ( test . toContainAnyValues ( ... someValues ) , test ) ;
197+ assert . throws ( ( ) => test . not . toContainAnyValues ( ... someValues ) , {
198198 message : `Expected the object NOT to contain any of the provided values <${ someValues } >` ,
199199 name : AssertionError . name ,
200200 } ) ;
@@ -206,11 +206,11 @@ describe("[Unit] ObjectAssertion.test.ts", () => {
206206 const wrongValues = [ 10 , { innerObjKey : 1 , message : "wrong inner value" } ] ;
207207 const test = new ObjectAssertion ( TEST_OBJ ) ;
208208
209- assert . throws ( ( ) => test . toContainAnyValues ( wrongValues ) , {
209+ assert . throws ( ( ) => test . toContainAnyValues ( ... wrongValues ) , {
210210 message : `Expected the object to contain at least one of the provided values <${ wrongValues } >` ,
211211 name : AssertionError . name ,
212212 } ) ;
213- assert . deepStrictEqual ( test . not . toContainAnyValues ( wrongValues ) , test ) ;
213+ assert . deepStrictEqual ( test . not . toContainAnyValues ( ... wrongValues ) , test ) ;
214214 } ) ;
215215 } ) ;
216216 } ) ;
0 commit comments