Closed maurogestoso closed 6 years ago
You should test that identity returns the same value it's passed. By doing that, you implicitly test that it returns the same type.
identity
e.g.
var input = [1, 2, 3]; expect(_.identity(input)).to.equal(input);
https://github.com/jonsey247/Lowbar/blob/eb0016ddad7d9bb3d94725fafe129fd0a46968b3/spec/lowbar.spec.js#L19-L32
Test added and passed
You should test that
identity
returns the same value it's passed. By doing that, you implicitly test that it returns the same type.e.g.
https://github.com/jonsey247/Lowbar/blob/eb0016ddad7d9bb3d94725fafe129fd0a46968b3/spec/lowbar.spec.js#L19-L32