@@ -253,7 +253,15 @@ Use `Testing` class for testing.
253
253
``` typescript
254
254
import { Testing } from " @angular-package/testing" ;
255
255
256
+ const t = new Testing ();
256
257
258
+ // Describe.
259
+ t .describe (` Describe ` , () => {
260
+ // Prepared `it` spec.
261
+ t .toBeBigInt (BigInt (37 ));
262
+ // Prepared expectation.
263
+ t .it (` It ` , () => t .expect .toBeBigInt (BigInt (27 )));
264
+ });
257
265
```
258
266
259
267
### ` TestingCustom `
@@ -330,6 +338,31 @@ t.describe(`TestingExpectTo`, () => t
330
338
331
339
Expectation methods are directly accessed in ` TestingExpectation ` by using method names instead of nested structure, but using it through the ` TestingExpectTo ` .
332
340
341
+ Example expectation method with ` actual ` param.
342
+
343
+ ``` typescript
344
+ public toBeTypeOf <T >(
345
+ actual : ExpectType < T > ,
346
+ expected : jasmine .Expected < string > ,
347
+ expectationFailOutput ?: any
348
+ ): this {
349
+ this .#testingTo .be .typeOf (actual , expected , expectationFailOutput );
350
+ return this ;
351
+ }
352
+ ```
353
+
354
+ Example expectation method with ` spy ` param.
355
+
356
+ ``` typescript
357
+ public toHaveBeenCalled < T extends jasmine .Func > (
358
+ spy : ExpectType < T > ,
359
+ expectationFailOutput ?: any
360
+ ): this {
361
+ this .#testingTo .have .been .called .called (spy , expectationFailOutput );
362
+ return this ;
363
+ }
364
+ ```
365
+
333
366
Jasmine matchers in use.
334
367
335
368
- [x] ` toBe() `
@@ -893,6 +926,35 @@ Method
893
926
` it ` methods are directly accessed by using method names instead of nested structure, but using it.
894
927
Standalone tests are designed to mixin them in ` TestingCustom ` class.
895
928
929
+ Example ` it ` method with ` actual ` param.
930
+
931
+ ``` typescript
932
+ public toEqual <T >(
933
+ actual : ExpectType < T > ,
934
+ expected : jasmine .Expected < typeof actual > ,
935
+ expectation ?: string ,
936
+ expectationFailOutput ?: any ,
937
+ execute ?: boolean ,
938
+ ): this {
939
+ this .to .equal (actual , expected , expectation , expectationFailOutput , execute );
940
+ return this ;
941
+ }
942
+ ```
943
+
944
+ Example ` it ` method with ` spy ` param.
945
+
946
+ ``` typescript
947
+ public toHaveBeenCalled < T extends jasmine .Func > (
948
+ spy : () => ExpectType < T > | ExpectType < T > [],
949
+ expectation ?: string ,
950
+ expectationFailOutput ?: any ,
951
+ execute ?: boolean ,
952
+ ): this {
953
+ this .toHave .been .called .called (spy , expectation , expectationFailOutput , execute );
954
+ return this ;
955
+ }
956
+ ```
957
+
896
958
### ` TestingToBeArrayOf `
897
959
898
960
Prepared ` it ` specs prefixed with ` testingToBeArrayOf ` .
0 commit comments