Skip to content

Commit

Permalink
fix: broken links to japa
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 7, 2023
1 parent 951ccb9 commit ee84d07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions content/guides/testing/http-tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AdonisJS ships with the Japa [API client](https://v2.japa.dev/plugins/api-client) plugin. You can use it to test your application HTTP endpoints.
AdonisJS ships with the Japa [API client](https://v2.japa.dev/docs/plugins/api-client) plugin. You can use it to test your application HTTP endpoints.

The primary use case for the API client is to test JSON responses. However, there are no technical limitations around other response types like HTML, or even plain text.

Expand Down Expand Up @@ -254,7 +254,7 @@ test('a user can update avatar', async ({ client, assert }) => {
## Additional assertions
You can validate the server response using the assertions available on the `response` object.

AdonisJS provides the following additional methods on top of the existing [Japa assertions](https://v2.japa.dev/plugins/api-client#assertions-api).
AdonisJS provides the following additional methods on top of the existing [Japa assertions](https://v2.japa.dev/docs/plugins/api-client#assertions-api).

### assertSession
Assert the given session exists. Optionally, you can also assert the session value.
Expand Down
12 changes: 6 additions & 6 deletions content/guides/testing/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test('display welcome page', async ({ client }) => {

- A test is registered using the `test` function exported by the `@japa/runner` package.
- The `test` function accepts the title as the first argument and the implementation callback as the second argument.
- The implementation callback receives the [Test context](https://v2.japa.dev/test-context). Test context contains additional properties you can use to have a better testing experience.
- The implementation callback receives the [Test context](https://v2.japa.dev/docs/test-context). Test context contains additional properties you can use to have a better testing experience.

Let's run the test by executing the following command.

Expand Down Expand Up @@ -114,14 +114,14 @@ export const configureSuite: Config['configureSuite'] = (suite) => {
#### plugins
The `plugins` property accepts an array of Japa plugins. By default, we register the following plugins.

- [`assert`](https://v2.japa.dev/plugins/assert) - Assert module to make assertions.
- [`runFailedTests`](https://v2.japa.dev/plugins/run-failed-tests) - A plugin to run only failed tests (if any).
- [`apiClient`](https://v2.japa.dev/plugins/api-client) - An API client for testing HTTP endpoints.
- [`assert`](https://v2.japa.dev/docs/plugins/assert) - Assert module to make assertions.
- [`runFailedTests`](https://v2.japa.dev/docs/plugins/run-failed-tests) - A plugin to run only failed tests (if any).
- [`apiClient`](https://v2.japa.dev/docs/plugins/api-client) - An API client for testing HTTP endpoints.

---

#### reporters
The `reporters` property accepts an array of Japa reporters. We register the [`spec-reporter`](https://v2.japa.dev/plugins/spec-reporter) to display the progress of tests on the terminal.
The `reporters` property accepts an array of Japa reporters. We register the [`spec-reporter`](https://v2.japa.dev/docs/plugins/spec-reporter) to display the progress of tests on the terminal.

---

Expand All @@ -134,7 +134,7 @@ You can use the `runnerHooks` property to run actions before or after the tests
---

#### configureSuite
The `configureSuite` method is executed with an instance of the [Japa suite](https://v2.japa.dev/core/suite) class. You can use the suite instance to configure it.
The `configureSuite` method is executed with an instance of the [Japa suite](https://v2.japa.dev/docs/core/suite) class. You can use the suite instance to configure it.

## Environment variables
During tests, AdonisJS automatically sets the value of `NODE_ENV` to `test`.
Expand Down

0 comments on commit ee84d07

Please sign in to comment.