[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Markdown api docs #150

Merged
merged 11 commits into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prepend md links with api/
this can be removed later when we don't need the prefix anymore
  • Loading branch information
leobalter committed Mar 30, 2017
commit 782a0ab942b32912095c7e5d912fb3b06b035230
2 changes: 1 addition & 1 deletion QUnit/only.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Adds a test to exclusively run, preventing all other tests from running.

| parameter | description |
|-----------|-------------|
| `assert` (object) | A new instance object with the [assertion methods](/assert) |
| `assert` (object) | A new instance object with the [assertion methods](/api/assert) |

### Description

Expand Down
2 changes: 1 addition & 1 deletion QUnit/skip.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Adds a test like object to be skipped

### Description

Use this method to replace [`QUnit.test()`](/main/QUnit.test/) instead of commenting out entire tests.
Use this method to replace [`QUnit.test()`](/QUnit/test/) instead of commenting out entire tests.

This test's prototype will be listed on the suite as a skipped test, ignoring the callback argument and the respective global and module's hooks.

Expand Down
4 changes: 2 additions & 2 deletions QUnit/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ categories:

## `QUnit.start()`

`QUnit.start()` must be used to start a test run that has [`QUnit.config.autostart`](/config/QUnit.config/) set to `false`.
`QUnit.start()` must be used to start a test run that has [`QUnit.config.autostart`](/api/config/QUnit.config/) set to `false`.

<p class="warning">Warning: This method was previously used to control async tests on text contexts along with `QUnit.stop`. For asynchronous tests, use [`assert.async`](/assert/async/) instead.</p>
<p class="warning">Warning: This method was previously used to control async tests on text contexts along with `QUnit.stop`. For asynchronous tests, use [`assert.async`](/api/assert/async/) instead.</p>

When your async test has multiple exit points, call `QUnit.start()` for the corresponding number of `QUnit.stop()` increments.

Expand Down
4 changes: 2 additions & 2 deletions QUnit/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Add a test to run.

| parameter | description |
|-----------|-------------|
| `assert` (object) | A new instance object with the [assertion methods](/assert) |
| `assert` (object) | A new instance object with the [assertion methods](/api/assert) |

### Description

Add a test to run using `QUnit.test()`.

The `assert` argument to the callback contains all of QUnit's [assertion methods](/assert). Use this argument to call your test assertions.
The `assert` argument to the callback contains all of QUnit's [assertion methods](/api/assert). Use this argument to call your test assertions.

`QUnit.test()` can automatically handle the asynchronous resolution of a Promise on your behalf if you return a `then`able Promise as the result of your callback function.

Expand Down
2 changes: 1 addition & 1 deletion QUnit/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Adds a test which expects at least one failing assertion during its run.

| parameter | description |
|-----------|-------------|
| `assert` (object) | A new instance object with the [assertion methods](/assert) |
| `assert` (object) | A new instance object with the [assertion methods](/api/assert) |

### Description

Expand Down
2 changes: 1 addition & 1 deletion assert/async.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Instruct QUnit to wait for an asynchronous operation.

The callback returned from `assert.async()` will throw an Error if it is invoked more than once (or more often than the accepted call count, if provided).

This replaces functionality previously provided by [`QUnit.stop()`](/main/QUnit.stop) and [`QUnit.start()`](/main/QUnit.start).
This replaces functionality previously provided by [`QUnit.stop()`](/QUnit/stop) and [`QUnit.start()`](/QUnit/start).

### Examples

Expand Down
2 changes: 1 addition & 1 deletion assert/deepEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A deep recursive comparison, working on primitive types, arrays, objects, regula

The `deepEqual()` assertion can be used just like `equal()` when comparing the value of objects, such that `{ key: value }` is equal to `{ key: value }`. For non-scalar values, identity will be disregarded by `deepEqual`.

[`notDeepEqual()`](/assert/notDeepEqual/) can be used to explicitly test deep, strict inequality.
[`notDeepEqual()`](/api/assert/notDeepEqual/) can be used to explicitly test deep, strict inequality.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions assert/equal.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A non-strict comparison, roughly equivalent to JUnit's `assertEquals`.

The `equal` assertion uses the simple comparison operator (`==`) to compare the actual and expected arguments. When they are equal, the assertion passes; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.

[`notEqual()`](/assert/notEqual/) can be used to explicitly test inequality.
[`notEqual()`](/api/assert/notEqual/) can be used to explicitly test inequality.

[`strictEqual()`](/assert/strictEqual/) can be used to test strict equality.
[`strictEqual()`](/api/assert/strictEqual/) can be used to test strict equality.

### Examples

Expand Down
2 changes: 1 addition & 1 deletion assert/notDeepEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An inverted deep recursive comparison, working on primitive types, arrays, objec

The `notDeepEqual()` assertion can be used just like `equal()` when comparing the value of objects, such that `{ key: value }` is equal to `{ key: value }`. For non-scalar values, identity will be disregarded by `notDeepEqual`.

[`deepEqual()`](/assert/deepEqual/) can be used to explicitly test deep, strict equality.
[`deepEqual()`](/api/assert/deepEqual/) can be used to explicitly test deep, strict equality.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions assert/notEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A non-strict comparison, checking for inequality.

The `notEqual` assertion uses the simple inverted comparison operator (`!=`) to compare the actual and expected arguments. When they aren't equal, the assertion passes; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.

[`equal()`](/assert/equal) can be used to test equality.
[`equal()`](/api/assert/equal) can be used to test equality.

[`notStrictEqual()`](/assert/notStrictEqual) can be used to test strict inequality.
[`notStrictEqual()`](/api/assert/notStrictEqual) can be used to test strict inequality.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions assert/notPropEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ The `notPropEqual` assertion uses the strict inverted comparison operator (`!==`

When they aren't equal, the assertion passes; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.

[`equal()`](/assert/equal/) can be used to test equality.
[`equal()`](/api/assert/equal/) can be used to test equality.

[`propEqual()`](/assert/propEqual/) can be used to test strict equality of an Object properties.
[`propEqual()`](/api/assert/propEqual/) can be used to test strict equality of an Object properties.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions assert/notStrictEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A strict comparison, checking for inequality.

The `notStrictEqual` assertion uses the strict inverted comparison operator (`!==`) to compare the actual and expected arguments. When they aren't equal, the assertion passes; otherwise, it fails. When it fails, both actual and expected values are displayed in the test result, in addition to a given message.

[`equal()`](/assert/equal/) can be used to test equality.
[`equal()`](/api/assert/equal/) can be used to test equality.

[`strictEqual()`](/assert/strictEqual/) can be used to test strict equality.
[`strictEqual()`](/api/assert/strictEqual/) can be used to test strict equality.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions assert/propEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A strict type and value comparison of an object's own properties.

The `propEqual()` assertion provides strictly (`===`) comparison of Object properties. Unlike `deepEqual()`, this assertion can be used to compare two objects made with different constructors and prototype.

[`strictEqual()`](/assert/strictEqual/) can be used to test strict equality.
[`strictEqual()`](/api/assert/strictEqual/) can be used to test strict equality.

[`notPropEqual()`](/assert/notPropEqual/) can be used to explicitly test strict inequality of Object properties.
[`notPropEqual()`](/api/assert/notPropEqual/) can be used to explicitly test strict inequality of Object properties.

### Example

Expand Down
4 changes: 2 additions & 2 deletions assert/strictEqual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A strict type and value comparison.

The `strictEqual()` assertion provides the most rigid comparison of type and value with the strict equality operator (`===`).

[`equal()`](/assert/equal/) can be used to test non-strict equality.
[`equal()`](/api/assert/equal/) can be used to test non-strict equality.

[`notStrictEqual()`](/assert/notStrictEqual/) can be used to explicitly test strict inequality.
[`notStrictEqual()`](/api/assert/notStrictEqual/) can be used to explicitly test strict inequality.

### Example

Expand Down
2 changes: 1 addition & 1 deletion callbacks/QUnit.log.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The properties of the details argument are listed below as options.
| `source` (string) | The associated stacktrace, either from an exception or pointing to the source of the assertion. Depends on browser support for providing stacktraces, so can be undefined. |
| `module` (string) | The test module name of the assertion. If the assertion is not connected to any module, the property's value will be _undefined_. |
| `name` (string) | The test block name of the assertion. |
| `runtime` (number) | The time elapsed in milliseconds since the start of the containing [`QUnit.test()`](/main/QUnit.test/), including setup. |
| `runtime` (number) | The time elapsed in milliseconds since the start of the containing [`QUnit.test()`](/QUnit/test/), including setup. |

### Examples

Expand Down
2 changes: 1 addition & 1 deletion config/QUnit.assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Namespace for QUnit assertions.

QUnit's built-in assertions are defined on the `QUnit.assert` object. An instance of this object is passed as the only argument to the `QUnit.test` function callback.

This object has properties for each of [QUnit's built-in assertion methods](/assert/).
This object has properties for each of [QUnit's built-in assertion methods](/api/assert/).

### Example

Expand Down
4 changes: 2 additions & 2 deletions config/QUnit.push.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ __DEPRECATED__: Report the result of a custom assertion
| `expected` | Known comparison value |
| `message` (string) | A short description of the assertion |

<p class="warning">This method is __deprecated__ and it's recommended to use [`pushResult`](/assert/pushResult/) on its direct reference in the assertion context.</p>
<p class="warning">This method is __deprecated__ and it's recommended to use [`pushResult`](/api/assert/pushResult/) on its direct reference in the assertion context.</p>

`QUnit.push` reflects to the current running test, and it may leak assertions in asynchronous mode. Checkout [`assert.pushResult()`](/assert/pushResult/) to set a proper custom assertion.
`QUnit.push` reflects to the current running test, and it may leak assertions in asynchronous mode. Checkout [`assert.pushResult()`](/api/assert/pushResult/) to set a proper custom assertion.

Invoking `QUnit.push` allows to create a readable expectation that is not defined by any of QUnit's built-in assertions.
2 changes: 1 addition & 1 deletion config/QUnit.stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Not all [browsers support retrieving stracktraces][browsers]. In those, `QUnit.s

### Example

The stacktrace line can be used on custom assertions and reporters. The following example [logs](/callbacks/QUnit.log/) the line of each passing assertion.
The stacktrace line can be used on custom assertions and reporters. The following example [logs](/api/callbacks/QUnit.log/) the line of each passing assertion.

```js
QUnit.log( function( details ) {
Expand Down