Skip to content

Commit 50a6cc6

Browse files
committed
Add a test of tuple creation performance with objects.
1 parent 9ec4d75 commit 50a6cc6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/tests.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,16 @@ describe("performance", function () {
226226
assert.deepEqual(tuple.apply(null, elems), elems);
227227
}
228228
});
229+
230+
it("can handle a lot of objects", function () {
231+
for (var i = 0; i < tupleCount; ++i) {
232+
const elems = [];
233+
for (var j = 0; j < elemCount; ++j) {
234+
elems.push({});
235+
}
236+
tuple.apply(null, elems).forEach(function (elem, i) {
237+
assert.strictEqual(elem, elems[i]);
238+
});
239+
}
240+
});
229241
});

0 commit comments

Comments
 (0)