Closed bdsoha closed 1 year ago
You can even add an optional assertion to make the tests more readable:
utils.addProperty(chai.Assertion.prototype, 'errors', function () {
this.assert(
this._obj._messages.length > 0,
'expected #{this} to have errors',
'expected #{this} to not have errors'
)
})
it('string equivalents are considered integers', () => {
expect(makeRule('1').integer()).to.not.have.errors
expect(makeRule('0').integer()).to.not.have.errors
expect(makeRule('-1').integer()).to.not.have.errors
})
Hi, thank you for your suggestion!
Frankly speaking, I don't have more time to write the test cases at this moment. Will you be interested to contribute to this project?
Thanks
@semisleep I already made a sample PR #41, take a look and let me know if it is something you are interested in.
Seems like the package is inactive.
The project is missing a test suite and therefore lacks user trust. I have put together a simple idea of how the tests should be structured.
Let me know if this is something you would want to expand upon and can even help write and run the required tests.