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