tj / should.js

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

should.not.be.json doesn't work #158

Closed andrezsanchez closed 10 years ago

andrezsanchez commented 10 years ago

Using whatever.should.not.be.json behaves the same as whatever.should.be.json

alsotang commented 10 years ago

Could you please give a fail example??

This is the implement of .should.be.json :+1:

  get json() {
    this.obj.should.have.property('headers');
    this.obj.headers.should.have.property('content-type');
    this.obj.headers['content-type'].should.include('application/json');
    return this;
  },

I think .should.not.be.json will work if the Object is not a json.


SORRY, I'm wrong..It really doesnt work.

andrezsanchez commented 10 years ago

Eh, maybe I should have thought about this more (and gone to sleep). I'm not sure should.not.be.json would have any use anyways, can't remember what I was trying to do when I found this. I would close this and #159, but I suppose @visionmedia might care, otherwise go ahead and close them.

alsotang commented 10 years ago

Should.js is now maintained by @btd

btd commented 10 years ago

Fixed in master