to be computed
Passes if the subject is a Knockout computed.
expect(ko.computed(function () {
return 42;
}), 'to be observable');
In case of a failing expectation you get the following output:
expect(ko.observable(42), 'to be computed');
expected ko.observable(42) to be computed
This assertion can be negated using the not flag:
expect(ko.observable(42), 'not to be computed');
In case of a failing expectation you get the following output:
expect(ko.computed(function () {
return 42;
}), 'not to be computed');
expected ko.computed(42) not to be computed