Use expect's instanceOf and toHaveProperty methods

This commit is contained in:
Deven Bansod
2018-03-27 21:59:38 +05:30
parent c9b99af5a6
commit b09c729675
51 changed files with 101 additions and 124 deletions

View File

@@ -1,22 +0,0 @@
var a = 1;
function rest() {
var b = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a;
expect(b).toBe(1);
}
rest(undefined, 2);
function rest2() {
var b = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a;
expect(arguments.length <= 1 ? undefined : arguments[1]).toBe(2);
}
rest2(undefined, 2);
function rest3() {
var b = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a;
expect(arguments.length <= 1 ? 0 : arguments.length - 1).toBe(1);
}
rest3(undefined, 2);