Skip to content

Commit 946803f

Browse files
docs(README.md): update and fix instanceof link
1 parent 58bdbad commit 946803f

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

README.md

+36-34
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ npm i --save @angular-package/testing
9191

9292
## Instance of
9393

94-
Possible names of javascript objects that can be checked by the [`instanceof`](js-instanceof) operator.
94+
Possible names of javascript objects that can be checked by the [`instanceof`][js-instanceof] operator.
9595

9696
```typescript
9797
const value: any = new Object({});
@@ -139,6 +139,8 @@ value instanceof WeakSet;
139139

140140
Simple `class` to support testing.
141141

142+
> Methods prefixed with the `toBe` aren't working with the `beforeEach()` function of jasmine.
143+
142144
**Static methods:**
143145

144146
| Testing. | Description |
@@ -426,7 +428,7 @@ public describe(
426428

427429
| Name: type | Description |
428430
| :---------------------------- | :---------- |
429-
| `description: string` | "Textual description of the group" with an optional defined prefix indicating its unique number inside the describe |
431+
| `description: string` | "Textual description of the group" with an optional its unique number inside the describe when adding `[counter]` |
430432
| `specDefinitions: () => void` | "Function for Jasmine to invoke that will define inner suites a specs" |
431433
| `execute: boolean` | A [`boolean`][js-boolean] type value to decide whether or not execute defined [`describe()`][jasmine-describe] of jasmine function |
432434

@@ -518,9 +520,9 @@ testing.describe(
518520
Executes the spec on a state `true` from the `execute` expecting the provided `value` to be the given `expected` value.
519521

520522
```typescript
521-
public toBe(
523+
public toBe<Value>(
522524
expectation: string,
523-
value: any,
525+
value: Value,
524526
expected: any,
525527
execute?: boolean
526528
): this {
@@ -534,8 +536,8 @@ public toBe(
534536
| Name: type | Description |
535537
| :-------------------- | :---------- |
536538
| `expectation: string` | "Textual description of what this spec is checking" with an optional its unique number when adding `[counter]` |
537-
| `value: any` | The value of any type passed to the `expect()` function of jasmine |
538-
| `expected: any` | The value of any type passed to the `toBe()` method of jasmine |
539+
| `value: Value` | The value of any type passed to the `expect()` function of jasmine |
540+
| `expected: any` | The value of any type passed to the `toBe()` method of `jasmine.Matchers` |
539541
| `execute?: boolean` | Whether or not to execute the spec |
540542

541543
**Returns:**
@@ -588,7 +590,7 @@ public toBeBigInt<Value>(
588590

589591
| Name: type | Description |
590592
| :-------------------- | :---------- |
591-
| `value: Value` | Any kind of value to check |
593+
| `value: Value` | The value of any type to check |
592594
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
593595
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be a bigint type` |
594596
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -637,7 +639,7 @@ public toBeBooleanType<Value>(
637639

638640
| Name: type | Description |
639641
| :-------------------- | :---------- |
640-
| `value: Value` | Any kind of value to check |
642+
| `value: Value` | The value of any type to check |
641643
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
642644
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be of a boolean type` |
643645
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -684,7 +686,7 @@ public toBeClass<Value>(
684686

685687
| Name: type | Description |
686688
| :-------------------- | :---------- |
687-
| `value: Value` | Any kind of value to check |
689+
| `value: Value` | The value of any type to check |
688690
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
689691
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be a class` |
690692
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -734,7 +736,7 @@ public toBeInstanceOfArray<Value>(
734736

735737
| Name: type | Description |
736738
| :-------------------- | :---------- |
737-
| `value: Value` | Any kind of value to check |
739+
| `value: Value` | The value of any type to check |
738740
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
739741
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of an Array` |
740742
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -781,7 +783,7 @@ public toBeInstanceOfBoolean<Value>(
781783

782784
| Name: type | Description |
783785
| :-------------------- | :---------- |
784-
| `value: Value` | Any kind of value to check |
786+
| `value: Value` | The value of any type to check |
785787
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
786788
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of an Boolean` |
787789
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -828,7 +830,7 @@ public toBeInstanceOfDate<Value>(
828830

829831
| Name: type | Description |
830832
| :-------------------- | :---------- |
831-
| `value: Value` | Any kind of value to check |
833+
| `value: Value` | The value of any type to check |
832834
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
833835
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of Date` |
834836
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -875,7 +877,7 @@ public toBeInstanceOfError<Value>(
875877

876878
| Name: type | Description |
877879
| :-------------------- | :---------- |
878-
| `value: Value` | Any kind of value to check |
880+
| `value: Value` | The value of any type to check |
879881
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
880882
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of an Error` |
881883
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -928,7 +930,7 @@ public toBeInstanceOfFunction<Value>(
928930

929931
| Name: type | Description |
930932
| :-------------------- | :---------- |
931-
| `value: Value` | Any kind of value to check |
933+
| `value: Value` | The value of any type to check |
932934
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
933935
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of a Function` |
934936
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -975,7 +977,7 @@ public toBeInstanceOfMap<Value>(
975977

976978
| Name: type | Description |
977979
| :-------------------- | :---------- |
978-
| `value: Value` | Any kind of value to check |
980+
| `value: Value` | The value of any type to check |
979981
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
980982
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of a Map` |
981983
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1022,7 +1024,7 @@ public toBeInstanceOfNumber<Value>(
10221024

10231025
| Name: type | Description |
10241026
| :-------------------- | :---------- |
1025-
| `value: Value` | Any kind of value to check |
1027+
| `value: Value` | The value of any type to check |
10261028
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
10271029
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of a Number` |
10281030
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1071,7 +1073,7 @@ public toBeInstanceOfObject<Value>(
10711073

10721074
| Name: type | Description |
10731075
| :-------------------- | :---------- |
1074-
| `value: Value` | Any kind of value to check |
1076+
| `value: Value` | The value of any type to check |
10751077
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
10761078
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of an Object` |
10771079
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1122,7 +1124,7 @@ public toBeInstanceOfPromise<Value>(
11221124

11231125
| Name: type | Description |
11241126
| :-------------------- | :---------- |
1125-
| `value: Value` | Any kind of value to check |
1127+
| `value: Value` | The value of any type to check |
11261128
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
11271129
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of Promise` |
11281130
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1175,7 +1177,7 @@ public toBeInstanceOfRangeError<Value>(
11751177

11761178
| Name: type | Description |
11771179
| :-------------------- | :---------- |
1178-
| `value: Value` | Any kind of value to check |
1180+
| `value: Value` | The value of any type to check |
11791181
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
11801182
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of RangeError` |
11811183
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1228,7 +1230,7 @@ public toBeInstanceOfReferenceError<Value>(
12281230

12291231
| Name: type | Description |
12301232
| :-------------------- | :---------- |
1231-
| `value: Value` | Any kind of value to check |
1233+
| `value: Value` | The value of any type to check |
12321234
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
12331235
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of ReferenceError` |
12341236
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1281,7 +1283,7 @@ public toBeInstanceOfRegExp<Value>(
12811283

12821284
| Name: type | Description |
12831285
| :-------------------- | :---------- |
1284-
| `value: Value` | Any kind of value to check |
1286+
| `value: Value` | The value of any type to check |
12851287
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
12861288
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of RegExp` |
12871289
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1330,7 +1332,7 @@ public toBeInstanceOfSet<Value>(
13301332

13311333
| Name: type | Description |
13321334
| :-------------------- | :---------- |
1333-
| `value: Value` | Any kind of value to check |
1335+
| `value: Value` | The value of any type to check |
13341336
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
13351337
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of Set` |
13361338
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1377,7 +1379,7 @@ public toBeInstanceOfStorage<Value>(
13771379

13781380
| Name: type | Description |
13791381
| :-------------------- | :---------- |
1380-
| `value: Value` | Any kind of value to check |
1382+
| `value: Value` | The value of any type to check |
13811383
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
13821384
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of Storage` |
13831385
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1424,7 +1426,7 @@ public toBeInstanceOfString<Value>(
14241426

14251427
| Name: type | Description |
14261428
| :-------------------- | :---------- |
1427-
| `value: Value` | Any kind of value to check |
1429+
| `value: Value` | The value of any type to check |
14281430
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
14291431
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of a String` |
14301432
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1471,7 +1473,7 @@ public toBeInstanceOfSyntaxError<Value>(
14711473

14721474
| Name: type | Description |
14731475
| :-------------------- | :---------- |
1474-
| `value: Value` | Any kind of value to check |
1476+
| `value: Value` | The value of any type to check |
14751477
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
14761478
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of SyntaxError` |
14771479
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1524,7 +1526,7 @@ public toBeInstanceOfSyntaxError<Value>(
15241526

15251527
| Name: type | Description |
15261528
| :-------------------- | :---------- |
1527-
| `value: Value` | Any kind of value to check |
1529+
| `value: Value` | The value of any type to check |
15281530
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
15291531
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of SyntaxError` |
15301532
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1577,7 +1579,7 @@ public toBeInstanceOfURIError<Value>(
15771579

15781580
| Name: type | Description |
15791581
| :-------------------- | :---------- |
1580-
| `value: Value` | Any kind of value to check |
1582+
| `value: Value` | The value of any type to check |
15811583
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
15821584
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of URIError` |
15831585
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1630,7 +1632,7 @@ public toBeInstanceOfWeakSet<Value>(
16301632

16311633
| Name: type | Description |
16321634
| :-------------------- | :---------- |
1633-
| `value: Value` | Any kind of value to check |
1635+
| `value: Value` | The value of any type to check |
16341636
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
16351637
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be an instance of WeakSet` |
16361638
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1677,7 +1679,7 @@ public toBeNull<Value>(
16771679

16781680
| Name: type | Description |
16791681
| :-------------------- | :---------- |
1680-
| `value: Value` | Any kind of value to check |
1682+
| `value: Value` | The value of any type to check |
16811683
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
16821684
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be null` |
16831685
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1724,7 +1726,7 @@ public toBeNumberType<Value>(
17241726

17251727
| Name: type | Description |
17261728
| :-------------------- | :---------- |
1727-
| `value: Value` | Any kind of value to check |
1729+
| `value: Value` | The value of any type to check |
17281730
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
17291731
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be of a number type` |
17301732
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1771,7 +1773,7 @@ public toBeStringType<Value>(
17711773

17721774
| Name: type | Description |
17731775
| :-------------------- | :---------- |
1774-
| `value: Value` | Any kind of value to check |
1776+
| `value: Value` | The value of any type to check |
17751777
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
17761778
| `expectation: string` | The message for the [karma][karma], which by default is set to `The value must be of a string type` |
17771779
| `expected: boolean` | Expects the result of the expectation must be `true` or `false`, by default it's `true` |
@@ -1805,9 +1807,9 @@ Executes the spec on a state `true` from the `execute` expecting the provided `v
18051807
> "Expect the actual `value` to be equal to the `expected`, using deep equality comparison."
18061808
18071809
```typescript
1808-
public toEqual(
1810+
public toEqual<Value>(
18091811
expectation: string,
1810-
value: any,
1812+
value: Value,
18111813
expected: any,
18121814
execute?: boolean
18131815
): this {
@@ -1822,7 +1824,7 @@ public toEqual(
18221824
| :-------------------- | :---------- |
18231825
| `expectation: string` | "Textual description of what this spec is checking" with an optional its unique number when adding `[counter]` |
18241826
| `value: Value` | The value of any type passed to the [`expect()`][jasmine-expect] function of jasmine |
1825-
| `expected: boolean` | The value of any type passed to the `toEqual()` method of jasmine. "The expected value to compare against." |
1827+
| `expected: boolean` | The value of any type passed to the `toEqual()` method of `jasmine.Matchers`. "The expected value to compare against." |
18261828
| `execute: boolean` | Whether or not to execute the spec, by default it's set to `true` |
18271829

18281830
**Returns:**

0 commit comments

Comments
 (0)