Skip to content

Commit

Permalink
Merge pull request #96 from TypedDevs/docs-assert-empty
Browse files Browse the repository at this point in the history
Add docs for assertEmpty and assertNotEmpty
  • Loading branch information
antonio-gg-dev authored Sep 17, 2023
2 parents 04b6514 + 11967fd commit 6aba585
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ function test_failure() {
}
```

## assertEmpty
> `assertEmpty "actual"`
Reports an error if `actual` is not empty.

[assertNotEmpty](#assertnotempty) is the inverse of this assertion and takes the same arguments.

*Example:*
```bash
function test_success() {
assertEmpty ""
}

function test_failure() {
assertEmpty "foo"
}
```

## assertMatches
> `assertMatches "pattern" "value"`
Expand Down Expand Up @@ -258,6 +276,24 @@ function test_failure() {
}
```

## assertNotEmpty
> `assertNotEmpty "actual"`
Reports an error if `actual` is empty.

[assertEmpty](#assertempty) is the inverse of this assertion and takes the same arguments.

*Example:*
```bash
function test_success() {
assertNotEmpty "foo"
}

function test_failure() {
assertNotEmpty ""
}
```

## assertNotMatches
> `assertNotMatches "pattern" "value"`
Expand Down

0 comments on commit 6aba585

Please sign in to comment.