Permalink
Browse files

Recommend supertest for endpoint testing (#1170)

  • Loading branch information...
1 parent 314f7a0 commit ab314c4c28ad7d77af7d3ce4fc10ec41c726cd32 @goto-bus-stop goto-bus-stop committed with novemberborn Jan 6, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/recipes/endpoint-testing.md
@@ -2,7 +2,7 @@
Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/docs/recipes/endpoint-testing.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/docs/recipes/endpoint-testing.md), [Italiano](https://github.com/avajs/ava-docs/blob/master/it_IT/docs/recipes/endpoint-testing.md), [日本語](https://github.com/avajs/ava-docs/blob/master/ja_JP/docs/recipes/endpoint-testing.md), [Português](https://github.com/avajs/ava-docs/blob/master/pt_BR/docs/recipes/endpoint-testing.md), [Русский](https://github.com/avajs/ava-docs/blob/master/ru_RU/docs/recipes/endpoint-testing.md), [简体中文](https://github.com/avajs/ava-docs/blob/master/zh_CN/docs/recipes/endpoint-testing.md)
-AVA doesn't have a builtin method for testing endpoints, but you can use any assertion library with it. Let's use [`supertest-as-promised`](https://github.com/WhoopInc/supertest-as-promised).
+AVA doesn't have a builtin method for testing endpoints, but you can use any assertion library with it. Let's use [`supertest`](https://github.com/visionmedia/supertest).
Since tests run concurrently, it's best to create a fresh server instance for each test, because if we referenced the same instance, it could be mutated between tests. This can be accomplished with a `test.beforeEach` and `t.context`, or with simply a factory function:

0 comments on commit ab314c4

Please sign in to comment.