Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Problems that testing library can create

Denis Bardadym edited this page Apr 30, 2015 · 2 revisions
  1. You mistyped getter/function:
obj.should.be.an.object;
//or
obj.should.be.an.object();

There is no object assertion, but exists Object. In case of getter assertion it is qualified as false positive assertion. In case of function assertion it will be runtime error that such method does not exists (probably with other words, but the same meaning).

In case of getter it is possible to fix this with Proxy to check getter before return.

  1. You forgot to call function:
obj.should.be.Object;

Assume .Object is function there. Actually on side of library it is not possible to fix. It will be false positive. Such cases very easy to find with any linter.

Clone this wiki locally