You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-9
Original file line number
Diff line number
Diff line change
@@ -1865,7 +1865,7 @@ Matchers that use the `toBe()` method of `jasmine.Matchers`.
1865
1865
|[`boolean()`](#testingtobematchersprototypeboolean)| Expects provided `value` to be a [`boolean`][js-boolean] type |
1866
1866
|[`class()`](#testingtobematchersprototypeclass)| Expects provided `value` to be a [`class`][js-classes]|
1867
1867
|[`date()`](#testingtobematchersprototypedate)| Expects provided `value` to be a [`Date`][js-date]|
1868
-
|[`defined()`](#testingtobematchersprototypdefined)| Expects provided `value` to be defined |
1868
+
|[`defined()`](#testingtobematchersprototypedefined)| Expects provided `value` to be defined |
1869
1869
|[`false()`](#testingtobematchersprototypefalse)| Expects provided `value` to be [`false`][js-boolean]|
1870
1870
|[`function()`](#testingtobematchersprototypefunction)| Expects provided `value` to be [`function`][js-function]|
1871
1871
|[`instance()`](#testingtobematchersprototypeinstance)| Expects provided `value` to be an instance of the given class from the `constructor`|
@@ -1888,6 +1888,8 @@ Matchers that use the `toBe()` method of `jasmine.Matchers`.
1888
1888
1889
1889
### `TestingToBeMatchers.prototype.array()`
1890
1890
1891
+
![new][new]
1892
+
1891
1893
Expects provided `value` to be an [`array`][js-array]. The method uses [`isArray()`](https://github.com/angular-package/type#isarray) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`bigint`][js-bigint] type. The method uses [`isBigInt()`](https://github.com/angular-package/type#isbigint) function from the [`@angular-package/type`][type-github-readme].
1946
1950
1947
1951
```typescript
@@ -1961,7 +1965,7 @@ public bigint(
1961
1965
1962
1966
| Name: type | Description |
1963
1967
| :--------------------------- | :---------- |
1964
-
|`value: Value`| The `value` of any type that is checked against the [`bigint`][js-bigint], and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
1968
+
|`value: any`| The `value` of any type that is checked against the [`bigint`][js-bigint] and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
1965
1969
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
1966
1970
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) [`bigint`][js-bigint]|
Expects provided `value` to be [`boolean`][js-boolean]. The method uses [`isBoolean()`](https://github.com/angular-package/type#isboolean) function from the [`@angular-package/type`][type-github-readme].
2000
2006
2001
2007
```typescript
@@ -2015,7 +2021,7 @@ public boolean(
2015
2021
2016
2022
| Name: type | Description |
2017
2023
| :--------------------------- | :---------- |
2018
-
|`value: any`| The `value` of any type that is checked against the [`boolean`][js-boolean], and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2024
+
|`value: any`| The `value` of any type that is checked against the [`boolean`][js-boolean] and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2019
2025
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2020
2026
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) [`boolean`][js-boolean]|
Expects provided `value` to be [`class`][js-classes]. The method uses [`isClass()`](https://github.com/angular-package/type#isclass) function from the [`@angular-package/type`][type-github-readme].
2054
2062
2055
2063
```typescript
@@ -2069,7 +2077,7 @@ public class(
2069
2077
2070
2078
| Name: type | Description |
2071
2079
| :--------------------------- | :---------- |
2072
-
|`value: any`| The `value` of any type that is checked against the [`class`][js-classes], and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2080
+
|`value: any`| The `value` of any type that is checked against the [`class`][js-classes] and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2073
2081
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2074
2082
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) [`class`][js-classes]|
Expects provided `value` to be a [`date`][js-date]. The method uses [`isDate()`](https://github.com/angular-package/type#isdate) function from the [`@angular-package/type`][type-github-readme].
2107
2117
2108
2118
```typescript
@@ -2122,7 +2132,7 @@ public date(
2122
2132
2123
2133
| Name: type | Description |
2124
2134
| :--------------------------- | :---------- |
2125
-
|`value: any`| The `value` of any type that is checked against [`date`][js-date], and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2135
+
|`value: any`| The `value` of any type that is checked against [`date`][js-date] and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2126
2136
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2127
2137
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) a [`date`][js-date]|
Expects provided `value` to be defined. The method uses [`isDefined()`](https://github.com/angular-package/type#isdefined) function from the [`@angular-package/type`][type-github-readme].
2160
2172
2161
2173
```typescript
@@ -2175,7 +2187,7 @@ public defined(
2175
2187
2176
2188
| Name: type | Description |
2177
2189
| :--------------------------- | :---------- |
2178
-
|`value: any`| The `value` of any type that is checked to the defined and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2190
+
|`value: any`| The `value` of any type that is checked against defined and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2179
2191
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2180
2192
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) defined |
Expects provided `value` to be `false`. The method uses [`isFalse()`](https://github.com/angular-package/type#isfalse) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`function`][js-function]. The method uses [`isFunction()`](https://github.com/angular-package/type#isfunction) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`function`][js-function]. The method uses [`isFunction()`](https://github.com/angular-package/type#isfunction) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be property key. The method uses [`isKey()`](https://github.com/angular-package/type#iskey) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be property key. The method uses [`isNull()`](https://github.com/angular-package/type#isnull) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`number`][js-number]. The method uses [`isNumber()`](https://github.com/angular-package/type#isnumber) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`number`][js-number] between a range. The method uses [`isNumberBetween()`](https://github.com/angular-package/type#isnumberbetween) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be an [`object`][js-object]. The method uses [`isObject()`](https://github.com/angular-package/type#isobject) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be an [`object`][js-object] with given keys. The method uses [`isObjectKey()`](https://github.com/angular-package/type#isobjectkey) function from the [`@angular-package/type`][type-github-readme].
2655
2685
2656
2686
```typescript
@@ -2672,7 +2702,7 @@ public objectKey(
2672
2702
| Name: type | Description |
2673
2703
| :--------------------------- | :---------- |
2674
2704
|`value: any`| The `value` of any type that is checked against the `object` that contains given keys and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2675
-
| `key: Key | Key[]` | Property name of `Key` type or an [`array`][js-array] of property names of `Key` type of [`object`][js-object] from the provided `value`|
2705
+
|`key: Key \| Key[]`| Property name of [`Key`](https://github.com/angular-package/type#key) type or an [`array`][js-array] of property names of [`Key`](https://github.com/angular-package/type#key) type of [`object`][js-object] from the provided `value`|
2676
2706
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2677
2707
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) an [`object`][js-object] with all given keys |
Expects provided `value` to be an [`object`][js-object] with given keys. The method uses [`isObjectKeyIn()`](https://github.com/angular-package/type#isobjectkeyin) function from the [`@angular-package/type`][type-github-readme].
2711
2743
2712
2744
```typescript
@@ -2728,7 +2760,7 @@ public objectKeyIn(
2728
2760
| Name: type | Description |
2729
2761
| :--------------------------- | :---------- |
2730
2762
|`value: any`| The `value` of any type that is checked against the [`object`][js-object] that contains given keys and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2731
-
| `key: Key | Key[]` | Property name of `Key` type or an [`array`][js-array] of property names of `Key` type of [`object`][js-object] from the provided `value`|
2763
+
|`key: Key \| Key[]`| Property name of [`Key`](https://github.com/angular-package/type#key) type or an [`array`][js-array] of property names of [`Key`](https://github.com/angular-package/type#key) type of [`object`][js-object] from the provided `value`|
2732
2764
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2733
2765
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) an [`object`][js-object] with all given keys |
Expects provided `value` to be an [`object`][js-object] with some of the given keys. The method uses [`isObjectKeyIn()`](https://github.com/angular-package/type#isobjectkeys) function from the [`@angular-package/type`][type-github-readme].
2766
2800
2767
2801
```typescript
@@ -2783,7 +2817,7 @@ public objectKeys(
2783
2817
| Name: type | Description |
2784
2818
| :--------------------------- | :---------- |
2785
2819
|`value: any`| The `value` of any type that is checked against the [`object`][js-object] that contains some of the given keys and the result of its check is passed to the [`expect()`][jasmine-expect] function of jasmine |
2786
-
|`key: Key[]`| An [`array`][js-array] of property names of the `Key` type of [`object`][js-object] from the provided `value`|
2820
+
|`key: Key[]`| An [`array`][js-array] of property names of the [`Key`](https://github.com/angular-package/type#key) type of [`object`][js-object] from the provided `value`|
2787
2821
|`expected: boolean`| The expected value of a [`boolean`][js-boolean] to compare against the result of the `value` check that is passed to the `toBe()` method of `jasmine.Matchers`|
2788
2822
|`expectationFailOutput: any`| An additional message when the matcher fails, by default, states the `value` should be (or not) an [`object`][js-object] with some given keys |
Expects provided `value` to be [`RegExp`][js-regexp]. The method uses [`isRegExp()`](https://github.com/angular-package/type#isregexp) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`string`][js-string]. The method uses [`isString()`](https://github.com/angular-package/type#isstring) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`string`][js-string] of the length between the given minimum to maximum. The method uses [`isStringLength()`](https://github.com/angular-package/type#isstringlength) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be [`symbol`][js-symbol]. The method uses [`isSymbol()`](https://github.com/angular-package/type#issymbol) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be `true`. The method uses [`isTrue()`](https://github.com/angular-package/type#istrue) function from the [`@angular-package/type`][type-github-readme].
Expects provided `value` to be `undefined`. The method uses [`isUndefined()`](https://github.com/angular-package/type#isundefined) function from the [`@angular-package/type`][type-github-readme].
0 commit comments