tj / should.js

BDD style assertions for node.js -- test framework agnostic
MIT License
2.75k stars 195 forks source link

Does str1.should.include.string(str2) work anymore? #31

Closed matthewmueller closed 12 years ago

matthewmueller commented 12 years ago

I'm getting errors in my test files and it looks like it's because should.include.string doesn't exist anymore. It's still in the docs, but it doesn't look like you're testing for it in should's test files.

Is should.include replacing should.include.string? Are they equivalent?

Thanks! Matt

tj commented 12 years ago

hmm the docs should mention .should.include(str) now, and array.should.include(value)

matthewmueller commented 12 years ago

I'm seeing:

Substring assertion:

'foobar'.should.include.string('foo')
tj commented 12 years ago

fixed

sam-araiza commented 5 years ago

doesn't seem to work anymore. however with es6 help, can do: 'foobar'.includes('foo').should.be.true()