Skip to content

Commit 1345021

Browse files
authored
Merge pull request #100 from keithamus/3.0.0
chore: build for 3.0.0
2 parents 3083ab1 + 4dcd072 commit 1345021

File tree

7 files changed

+1193
-854
lines changed

7 files changed

+1193
-854
lines changed

README.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ chai.request(app)
126126
expect(res).to.have.status(200);
127127
});
128128
```
129-
130129
##### Caveat
131-
132130
Because the `end` function is passed a callback, assertions are run
133131
asynchronously. Therefore, a mechanism must be used to notify the testing
134132
framework that the callback has completed. Otherwise, the test will pass before
@@ -218,44 +216,6 @@ agent
218216
})
219217
```
220218

221-
### .then (resolveCb, rejectCb)
222-
223-
* **@param** _{Function}_ resolveCB
224-
* **@cb** {Response}
225-
* **@param** _{Function}_ rejectCB
226-
* **@cb** {Error}
227-
228-
Invoke the request to to the server. The response
229-
will be passed as a parameter to the resolveCb,
230-
while any errors will be passed to rejectCb.
231-
232-
```js
233-
chai.request(app)
234-
.get('/')
235-
.then(function (res) {
236-
expect(res).to.have.status(200);
237-
}, function (err) {
238-
throw err;
239-
});
240-
```
241-
242-
### .catch (rejectCb)
243-
244-
* **@param** _{Function}_ rejectCB
245-
* **@cb** {Error}
246-
247-
Invoke the request to to the server, catching any
248-
errors with this callback. Behaves the same as
249-
Promises.
250-
251-
```js
252-
chai.request(app)
253-
.get('/')
254-
.catch(function (err) {
255-
throw err;
256-
});
257-
```
258-
259219
## Assertions
260220

261221
The Chai HTTP module provides a number of assertions

0 commit comments

Comments
 (0)