Skip to content

Commit

Permalink
Add toBeNaN matcher to docs (#7583)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored and SimenB committed Jan 7, 2019
1 parent adb43c1 commit 483f5ad
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-22.0/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-22.1/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-22.2/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-22.3/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.0/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.1/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.2/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.3/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.4/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.5/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-23.6/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,17 @@ test('the best drink for octopus flavor is undefined', () => {

You could write `expect(bestDrinkForFlavor('octopus')).toBe(undefined)`, but it's better practice to avoid referring to `undefined` directly in your code.

### `.toBeNaN()`

Use `.toBeNaN` when checking a value is `NaN`.

```js
test('passes when value is NaN', () => {
expect(NaN).toBeNaN();
expect(1).not.toBeNaN();
});
```

### `.toContain(item)`

Use `.toContain` when you want to check that an item is in an array. For testing the items in the array, this uses `===`, a strict equality check. `.toContain` can also check whether a string is a substring of another string.
Expand Down

0 comments on commit 483f5ad

Please sign in to comment.