Skip to content

Commit ade4398

Browse files
authored
refactor: remove polyfills (#1110)
BREAKING CHANGE: Remove polyfills from library
1 parent 1d1d003 commit ade4398

File tree

4 files changed

+3
-27
lines changed

4 files changed

+3
-27
lines changed

Diff for: packages/test-utils/src/mount.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// @flow
22

3-
import './matches-polyfill'
4-
import './object-assign-polyfill'
53
import Vue from 'vue'
64
import VueWrapper from './vue-wrapper'
75
import createInstance from 'create-instance'

Diff for: packages/test-utils/src/object-assign-polyfill.js

-23
This file was deleted.

Diff for: test/setup/karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = function (config) {
77
reporters: ['spec'],
88
files: [
99
'../../node_modules/babel-polyfill/dist/polyfill.js',
10+
'./polyfills.js',
1011
'load-tests.js'
1112
],
1213
preprocessors: {

Diff for: packages/test-utils/src/matches-polyfill.js renamed to test/setup/polyfills.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ if (typeof Element !== 'undefined' && !Element.prototype.matches) {
66
Element.prototype.oMatchesSelector ||
77
Element.prototype.webkitMatchesSelector ||
88
function (s) {
9-
const matches = (this.document || this.ownerDocument).querySelectorAll(s)
10-
let i = matches.length
9+
var matches = (this.document || this.ownerDocument).querySelectorAll(s)
10+
var i = matches.length
1111
while (--i >= 0 && matches.item(i) !== this) {}
1212
return i > -1
1313
}

0 commit comments

Comments
 (0)