Comments (1)
Oh. I'm stupid. You don't need to put should
in the chain for every additional assertion you want to make. In other words, you should only include should
once in a chain.
Now, this works:
var k = {
'foo': 'chicken'
}
k.should.have.property('foo')
.and.equal('chicken')
from should.js.
Related Issues (20)
- rejectedWith is missing a return type annotation HOT 2
- containDeep erroneously passes when comparing array with a string value to a string value within object HOT 1
- General query - what are common test assertions used? HOT 2
- Need to rework browser testing
- Set support HOT 2
- Assertion#size(s) broken when requiring should as a function HOT 1
- node_modules/should/should.d.ts(237,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'should' must be of type 'Assertion', but here has type 'Assertion'. HOT 4
- Comparaison of arrays of resolved promises HOT 3
- Feature request: pass index and array arguments in matchEach() HOT 1
- Assertion throw is called in a global context HOT 1
- Typings for custom assertions HOT 2
- Suggestion: extend .equal() with .equal.to() or equalTo() HOT 1
- should.rejected() does not compile in typescript HOT 1
- should(obj).have.only.keys() do not work when using should/as-function HOT 2
- Unexpected behavior of `NaN.should.be.a.Number()` HOT 2
- Missing Git tags HOT 3
- Inconsistent behaviour between should.be.true and should.equal(true) on promise resolved value HOT 1
- which.is.a.Number().or.is.Null() HOT 1
- TypeError: should(...).not.exist is not a function HOT 6
- Breaking change for rejectedWith HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from should.js.