Skip to content

Commit 297c71a

Browse files
authored
Merge pull request #1157 from chaijs/fix-docs-example
docs: fix bad `.string` example
2 parents 1021f40 + 4584706 commit 297c71a

File tree

2 files changed

+1511
-847
lines changed

2 files changed

+1511
-847
lines changed

lib/chai/core/assertions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,8 +2189,8 @@ module.exports = function (chai, _) {
21892189
* message to show when the assertion fails. The message can also be given as
21902190
* the second argument to `expect`.
21912191
*
2192-
* expect('foobar').to.have.string(/taco/, 'nooo why fail??');
2193-
* expect('foobar', 'nooo why fail??').to.have.string(/taco/);
2192+
* expect('foobar').to.have.string('taco', 'nooo why fail??');
2193+
* expect('foobar', 'nooo why fail??').to.have.string('taco');
21942194
*
21952195
* @name string
21962196
* @param {String} str

0 commit comments

Comments
 (0)