Skip to content

Commit

Permalink
modify test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-xiao-jian committed Sep 21, 2014
1 parent 3e8e2d5 commit d7c3b97
Show file tree
Hide file tree
Showing 3 changed files with 323 additions and 194 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stream-assert-gulp",
"version": "0.4.0",
"version": "0.4.3",
"description": "simplify assertion library for gulp streams",
"main": "index.js",
"scripts": {
Expand Down
11 changes: 5 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ it('should pass data to next when undeclared', function (done) {

## API

Builder for asserting gulp stream. Constructed stream will emit `end` after stream assert, without any augument for success, with assertion error as first argument for fail.
Build for asserting gulp stream. Constructed stream will emit `end` after stream assert, without any augument for success, with assertion error as first argument for fail.

### Assertion
Assertion is a funtion with each file as the first argument, just assert the file. For example:
Expand Down Expand Up @@ -73,11 +73,10 @@ Calls `assertion` function on every-child element in stream. Only if any of the
match the assertion, then pass success.

## Assert chain
As promised, now it does support chain assert after v0.2.x, better than `stream-assert`.
Pay attention when you need chain assert, assert below just work right, when all the
assertion passed, the `done` callback has no argument. when any assertion failed, it
will jump to the end, and `done` callback has error(this assertion throwed) as first
argument.
As promised, now it does support chain assert after v0.2.x. Pay attention when you need
chain assert, assert below just work right, when all the assertion passed, the `done`
callback has no argument. when any assertion failed, it will jump to the end, and `done`
callback has error(this assertion throwed) as first argument.

Till now, `length`, `nth`, `first`, `last` support chained asssertion, also, `all` and `any`
works for chained assertion since v0.4.0.
Expand Down
Loading

0 comments on commit d7c3b97

Please sign in to comment.