To test that an object was constructed by a given constructor function, use jasmine.any(Klass)
:
describe('plus()', function() {
it ('returns a number', function() {
let result = plus(1, 2)
expect(result).toEqual(jasmine.any(Number))
})
})
Posted by Henning Koch to makandra dev (2020-01-29 09:19)