Remove assert.* from commented out assertions
This commit is contained in:
parent
c8d82d6483
commit
c9b99af5a6
@ -1,8 +1,8 @@
|
|||||||
// var { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
|
// var { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
|
||||||
|
|
||||||
// assert.equal(x, 1);
|
// expect(x).toBe(1);
|
||||||
// assert.equal(y, 2);
|
// expect(y).toBe(2);
|
||||||
// assert.deepEqual(z, { a: 3, b: 4 });
|
// expect(z).toEqual({ a: 3, b: 4 });
|
||||||
|
|
||||||
// var complex = {
|
// var complex = {
|
||||||
// x: { a: 1, b: 2, c: 3 },
|
// x: { a: 1, b: 2, c: 3 },
|
||||||
@ -12,11 +12,11 @@
|
|||||||
// x: { a: xa, ...xbc }
|
// x: { a: xa, ...xbc }
|
||||||
// } = complex;
|
// } = complex;
|
||||||
|
|
||||||
// assert.equal(xa, 1);
|
// expect(xa).toBe(1);
|
||||||
// assert.deepEqual(xbc, { b: 2, c: 3});
|
// expect(xbc).toEqual({ b: 2, c: 3});
|
||||||
|
|
||||||
// // own properties
|
// // own properties
|
||||||
// function ownX({ ...properties }) {
|
// function ownX({ ...properties }) {
|
||||||
// return properties.x;
|
// return properties.x;
|
||||||
// }
|
// }
|
||||||
// assert.equal(ownX(Object.create({ x: 1 })), undefined);
|
// expect(ownX(Object.create({ x: 1 }))).toBeUndefined();
|
||||||
|
|||||||
@ -26,7 +26,7 @@ expect(obj.getElement()).toBe(40);
|
|||||||
expect(obj.makeFilterCapturedThis()(40)).toBe(true);
|
expect(obj.makeFilterCapturedThis()(40)).toBe(true);
|
||||||
|
|
||||||
// http://code.google.com/p/v8/issues/detail?id=1381
|
// http://code.google.com/p/v8/issues/detail?id=1381
|
||||||
// assert.isUndefined(obj.makeFilterLostThis()());
|
// expect(obj.makeFilterLostThis()()).toBeUndefined();
|
||||||
|
|
||||||
obj.element = 39;
|
obj.element = 39;
|
||||||
expect(obj.makeFilterCapturedThis()(40)).toBe(false);
|
expect(obj.makeFilterCapturedThis()(40)).toBe(false);
|
||||||
|
|||||||
@ -18,7 +18,6 @@ class C extends B {
|
|||||||
expect(--super.x).toBe(0);
|
expect(--super.x).toBe(0);
|
||||||
expect(this.x).toBe(0);
|
expect(this.x).toBe(0);
|
||||||
|
|
||||||
// Don't use assert.typeOf since we are testing typeof.
|
|
||||||
expect(typeof super.x).toBe('number');
|
expect(typeof super.x).toBe('number');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ expect(t.get(1 / Infinity)).toBe('value11');
|
|||||||
|
|
||||||
// V8 is broken for -0
|
// V8 is broken for -0
|
||||||
// https://code.google.com/p/v8/issues/detail?id=3906
|
// https://code.google.com/p/v8/issues/detail?id=3906
|
||||||
// assert.equal(t.get(-1 / Infinity), 'value11');
|
// expect(t.get(-1 / Infinity)).toBe('value11');
|
||||||
|
|
||||||
expect(t.has({})).toBe(false);
|
expect(t.has({})).toBe(false);
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ expect(t.has(0)).toBe(true);
|
|||||||
|
|
||||||
// V8 is broken for -0
|
// V8 is broken for -0
|
||||||
// https://code.google.com/p/v8/issues/detail?id=3906
|
// https://code.google.com/p/v8/issues/detail?id=3906
|
||||||
// assert.isTrue(t.has(-0));
|
// expect(t.has(-0)).toBe(true);
|
||||||
|
|
||||||
|
|
||||||
// forEach
|
// forEach
|
||||||
|
|||||||
@ -43,7 +43,7 @@ expect(t.has(0)).toBe(true);
|
|||||||
|
|
||||||
// V8 is broken for -0
|
// V8 is broken for -0
|
||||||
// https://code.google.com/p/v8/issues/detail?id=3906
|
// https://code.google.com/p/v8/issues/detail?id=3906
|
||||||
// assert.isTrue(t.has(-0));
|
// expect(t.has(-0)).toBe(true);
|
||||||
|
|
||||||
var expected = [
|
var expected = [
|
||||||
undefinedKey,
|
undefinedKey,
|
||||||
|
|||||||
@ -12,8 +12,8 @@ expect(result.b).toBe(1);
|
|||||||
expect(result.c).toEqual([2, 3]);
|
expect(result.c).toEqual([2, 3]);
|
||||||
expect(result.d).toEqual([]);
|
expect(result.d).toEqual([]);
|
||||||
|
|
||||||
assert.throw(function() {
|
expect(function() {
|
||||||
var e;
|
var e;
|
||||||
// No iterator.
|
// No iterator.
|
||||||
[...e] = {x: 'boom'};
|
[...e] = {x: 'boom'};
|
||||||
}, TypeError);
|
}).toThrow(TypeError);
|
||||||
|
|||||||
@ -17,7 +17,6 @@ var o = {
|
|||||||
expect(--super.x).toBe(0);
|
expect(--super.x).toBe(0);
|
||||||
expect(this.x).toBe(0);
|
expect(this.x).toBe(0);
|
||||||
|
|
||||||
// Don't use assert.typeOf since we are testing typeof.
|
|
||||||
expect(typeof super.x).toBe('number');
|
expect(typeof super.x).toBe('number');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,7 @@ var object = {};
|
|||||||
object[s] = 42;
|
object[s] = 42;
|
||||||
expect(object[s]).toBe(42);
|
expect(object[s]).toBe(42);
|
||||||
// Native Symbol throws for ToString.
|
// Native Symbol throws for ToString.
|
||||||
// assert.isUndefined(object[s + '']);
|
// expect(object[s + '']).toBeUndefined();
|
||||||
expect(Object.getOwnPropertyNames(object)).toEqual([]);
|
expect(Object.getOwnPropertyNames(object)).toEqual([]);
|
||||||
expect(object.hasOwnProperty(s)).toBe(true);
|
expect(object.hasOwnProperty(s)).toBe(true);
|
||||||
|
|
||||||
|
|||||||
@ -9,5 +9,5 @@ expect(() => {
|
|||||||
|
|
||||||
// TODO(jjb): Our impl not to spec so generators can use Symbols without
|
// TODO(jjb): Our impl not to spec so generators can use Symbols without
|
||||||
// requiring transcoding
|
// requiring transcoding
|
||||||
// assert.equal(s.toString(), 'Symbol(s)');
|
// expect(s.toString()).toBe('Symbol(s)');
|
||||||
expect(s.valueOf()).toBe(s);
|
expect(s.valueOf()).toBe(s);
|
||||||
|
|||||||
@ -62,7 +62,7 @@ expect(`${ null }`).toBe('null');
|
|||||||
// return ' ' if x else ''
|
// return ' ' if x else ''
|
||||||
// for i in range(16):
|
// for i in range(16):
|
||||||
// v = (s(i&8), s(i&4), s(i&2), s(i&1))
|
// v = (s(i&8), s(i&4), s(i&2), s(i&1))
|
||||||
// print "assert.equal('%s3%s5%s8%s', `%s${x}%s${y}%s${x+y}%s`);" % (v+v)
|
// print "expect('%s3%s5%s8%s').toBe(`%s${x}%s${y}%s${x+y}%s`);" % (v+v)
|
||||||
expect(`${x}${y}${x+y}`).toBe('358');
|
expect(`${x}${y}${x+y}`).toBe('358');
|
||||||
expect(`${x}${y}${x+y} `).toBe('358 ');
|
expect(`${x}${y}${x+y} `).toBe('358 ');
|
||||||
expect(`${x}${y} ${x+y}`).toBe('35 8');
|
expect(`${x}${y} ${x+y}`).toBe('35 8');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user