jeudi 3 décembre 2015

How can multiple should.equal can be chained?

I'm using mocha with should.js for testing, I'm trying:

(time1).should.equal(time2).and.should.equal('10am');

But that will throw an error:

 Uncaught AssertionError: expected {
  anyOne: false,
  negate: false,
  obj: '10am',
  params: {
    expected: '10am',
    message: undefined,
    operator: 'to be',
    showDiff: true
  }
} to be '10am'

How can I properly chain these?

Aucun commentaire:

Enregistrer un commentaire