add instance method tests

This commit is contained in:
Henry Zhu 2017-03-31 16:16:59 -04:00
parent c10528254b
commit 7df557a269
6 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,12 @@
Array.from; // static function
Map; // top level built-in
// instance methods may have false positives (which is ok)
a.includes(); // method call
b['find'] // computed string?
c.prototype.findIndex(); // .prototype
d.fill.bind(); //.bind
e.padStart.apply(); // .apply
f.padEnd.call(); // .call
String.prototype.startsWith.call; // prototype.call
var { codePointAt, endsWith } = k; // destructuring

View File

@ -0,0 +1,12 @@
Array.from; // static function
Map; // top level built-in
// instance methods may have false positives (which is ok)
a.includes(); // method call
b['find']; // computed string?
c.prototype.findIndex(); // .prototype
d.fill.bind(); //.bind
e.padStart.apply(); // .apply
f.padEnd.call(); // .call
String.prototype.startsWith.call; // prototype.call
var { codePointAt, endsWith } = k; // destructuring

View File

@ -0,0 +1,11 @@
{
"presets": [
["../../../../lib", {
"addUsedBuiltIns": true,
"modules": false,
"targets": {
"chrome": 58
}
}]
]
}

View File

@ -0,0 +1,12 @@
Array.from; // static function
Map; // top level built-in
// instance methods may have false positives (which is ok)
a.includes(); // method call
b['find'] // computed string?
c.prototype.findIndex(); // .prototype
d.fill.bind(); //.bind
e.padStart.apply(); // .apply
f.padEnd.call(); // .call
String.prototype.startsWith.call; // prototype.call
var { codePointAt, endsWith } = k; // destructuring

View File

@ -0,0 +1,26 @@
import 'core-js/modules/es6.array.from';
import 'core-js/modules/es6.map';
import 'core-js/modules/es7.array.includes';
import 'core-js/modules/es6.string.includes';
import 'core-js/modules/es6.array.find';
import 'core-js/modules/es6.array.find-index';
import 'core-js/modules/es6.array.fill';
import 'core-js/modules/es7.string.pad-start';
import 'core-js/modules/es7.string.pad-end';
import 'core-js/modules/es6.string.starts-with';
import 'core-js/modules/es6.string.code-point-at';
import 'core-js/modules/es6.string.ends-with';
Array.from; // static function
Map; // top level built-in
// instance methods may have false positives (which is ok)
a.includes(); // method call
b['find']; // computed string?
c.prototype.findIndex(); // .prototype
d.fill.bind(); //.bind
e.padStart.apply(); // .apply
f.padEnd.call(); // .call
String.prototype.startsWith.call; // prototype.call
var _k = k,
codePointAt = _k.codePointAt,
endsWith = _k.endsWith; // destructuring

View File

@ -0,0 +1,8 @@
{
"presets": [
["../../../../lib", {
"addUsedBuiltIns": true,
"modules": false
}]
]
}