diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-03-13 13:33:12 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-03-13 13:33:12 -0500 |
commit | 34ef070a44e7bde1d41bc1700362c214556d8b94 (patch) | |
tree | a5dffc35e8302054fd9797385193e8ec4a62b171 | |
parent | 5fb281f448a363a48e7b85e2eca9ecd689e94f52 (diff) | |
download | gitlab-ce-use-corejs-polyfills.tar.gz |
remove unneeded polyfill tests (core-js tests these for us)use-corejs-polyfills
-rw-r--r-- | spec/javascripts/polyfills/array_spec.js | 26 | ||||
-rw-r--r-- | spec/javascripts/polyfills/object_spec.js | 25 |
2 files changed, 0 insertions, 51 deletions
diff --git a/spec/javascripts/polyfills/array_spec.js b/spec/javascripts/polyfills/array_spec.js deleted file mode 100644 index ed770873ba4..00000000000 --- a/spec/javascripts/polyfills/array_spec.js +++ /dev/null @@ -1,26 +0,0 @@ -// ensure core-js polyfills work as intended - -describe('Array polyfills', () => { - describe('find', function () { - beforeEach(() => { - this.arr = [0, 1, 2, 3, 4, 5]; - }); - - it('returns the item that first passes the predicate function', () => { - expect(this.arr.find(item => item === 2)).toBe(2); - }); - - it('returns undefined if no items pass the predicate function', () => { - expect(this.arr.find(item => item === 6)).not.toBeDefined(); - }); - - it('error when called on undefined or null', () => { - expect(Array.prototype.find.bind(undefined, item => item === 1)).toThrow(); - expect(Array.prototype.find.bind(null, item => item === 1)).toThrow(); - }); - - it('error when predicate is not a function', () => { - expect(Array.prototype.find.bind(this.arr, 1)).toThrow(); - }); - }); -}); diff --git a/spec/javascripts/polyfills/object_spec.js b/spec/javascripts/polyfills/object_spec.js deleted file mode 100644 index 3e4fd5f7382..00000000000 --- a/spec/javascripts/polyfills/object_spec.js +++ /dev/null @@ -1,25 +0,0 @@ -// ensure core-js polyfills work as intended - -describe('Object polyfills', () => { - describe('assign', () => { - it('merges source object into target object', () => { - const targetObj = {}; - const sourceObj = { - foo: 'bar', - }; - Object.assign(targetObj, sourceObj); - expect(targetObj.foo).toBe('bar'); - }); - - it('merges object with the same properties', () => { - const targetObj = { - foo: 'bar', - }; - const sourceObj = { - foo: 'baz', - }; - Object.assign(targetObj, sourceObj); - expect(targetObj.foo).toBe('baz'); - }); - }); -}); |