diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b31e33bc00..d89c602b1c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Changelog ##### Unreleased -- Nothing +- Fixed wrong export in `/(stable|actual/full)/instance/unshift` entries ##### [3.28.0 - 2023.02.14](https://github.com/zloirock/core-js/releases/tag/v3.28.0) **I highly recommend reading this: [So, what's next?](https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md)** diff --git a/packages/core-js/actual/instance/unshift.js b/packages/core-js/actual/instance/unshift.js index 360f6b658300..e07c9009b5f4 100644 --- a/packages/core-js/actual/instance/unshift.js +++ b/packages/core-js/actual/instance/unshift.js @@ -1,3 +1,3 @@ -var parent = require('../../stable/instance/push'); +var parent = require('../../stable/instance/unshift'); module.exports = parent; diff --git a/packages/core-js/full/instance/unshift.js b/packages/core-js/full/instance/unshift.js index f2b1b1585bc2..fe105ac94479 100644 --- a/packages/core-js/full/instance/unshift.js +++ b/packages/core-js/full/instance/unshift.js @@ -1,3 +1,3 @@ -var parent = require('../../actual/instance/push'); +var parent = require('../../actual/instance/unshift'); module.exports = parent; diff --git a/packages/core-js/stable/instance/unshift.js b/packages/core-js/stable/instance/unshift.js index c1d3a2e5bad9..360c9b67ff93 100644 --- a/packages/core-js/stable/instance/unshift.js +++ b/packages/core-js/stable/instance/unshift.js @@ -1,3 +1,3 @@ -var parent = require('../../es/instance/push'); +var parent = require('../../es/instance/unshift'); module.exports = parent; diff --git a/tests/entries/unit.mjs b/tests/entries/unit.mjs index b3c96500dff3..6bc9d37efcad 100644 --- a/tests/entries/unit.mjs +++ b/tests/entries/unit.mjs @@ -592,7 +592,9 @@ for (PATH of ['core-js-pure', 'core-js']) { ok(typeof instanceUnshift == 'function'); ok(instanceUnshift({}) === undefined); ok(typeof instanceUnshift([]) == 'function'); - ok(instanceUnshift([]).call([1], 8) === 2); + const instanceUnshiftTestArray = [1]; + ok(instanceUnshift([]).call(instanceUnshiftTestArray, 8)); + ok(instanceUnshiftTestArray[0] === 8); const instanceValues = load(NS, 'instance/values'); ok(typeof instanceValues == 'function');