Skip to content

Commit

Permalink
Check for ie11
Browse files Browse the repository at this point in the history
  • Loading branch information
chadhietala committed Apr 13, 2018
1 parent eddb932 commit f628372
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/@glimmer/program/test/heap-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ QUnit.test('Can grow', (assert) => {
// we get the whole thing out
let serialized = heap.capture(Number.MAX_SAFE_INTEGER);
let serializedHeap = new Uint16Array(serialized.buffer);
assert.equal(serializedHeap.byteLength, size * 2);
assert.equal(serializedHeap.length, size);
assert.equal(serializedHeap[size - 1], 10);

heap.push(11);

serialized = heap.capture(Number.MAX_SAFE_INTEGER);
serializedHeap = new Uint16Array(serialized.buffer);
assert.equal(serializedHeap.byteLength, size * 4);

if (serializedHeap.slice) {
assert.equal(serializedHeap.length, size * 2);
} else {
// IE11 only gives you a buffer with residents in the slots
assert.equal(serializedHeap.length, size + 1);
}
assert.equal(serializedHeap[size], 11);
});

0 comments on commit f628372

Please sign in to comment.