mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
9 lines
339 B
JavaScript
9 lines
339 B
JavaScript
import unThis from 'core-js-pure/full/function/un-this';
|
|
|
|
QUnit.test('Function#unThis', assert => {
|
|
assert.isFunction(unThis);
|
|
// eslint-disable-next-line prefer-arrow-callback -- required for testing
|
|
assert.same(unThis(function () { return 42; })(), 42);
|
|
assert.deepEqual(unThis(Array.prototype.slice)([1, 2, 3], 1), [2, 3]);
|
|
});
|