dry up classes
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
var arr = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
7
test/fixtures/block-binding/program/expected.js
vendored
Normal file
7
test/fixtures/block-binding/program/expected.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(function () {
|
||||
var arr = [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
];
|
||||
})();
|
||||
5
test/fixtures/classes/accessing-super-without-having-one/actual.js
vendored
Normal file
5
test/fixtures/classes/accessing-super-without-having-one/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
3
test/fixtures/classes/accessing-super-without-having-one/options.json
vendored
Normal file
3
test/fixtures/classes/accessing-super-without-having-one/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "cannot access super as this class has none"
|
||||
}
|
||||
4
test/fixtures/classes/defining-constructor-as-a-mutator/actual.js
vendored
Normal file
4
test/fixtures/classes/defining-constructor-as-a-mutator/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
get constructor() {
|
||||
}
|
||||
}
|
||||
3
test/fixtures/classes/defining-constructor-as-a-mutator/options.json
vendored
Normal file
3
test/fixtures/classes/defining-constructor-as-a-mutator/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "unknown kind for constructor method"
|
||||
}
|
||||
5
test/fixtures/classes/no-accessing-super-properties/actual.js
vendored
Normal file
5
test/fixtures/classes/no-accessing-super-properties/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
class Test extends Foo {
|
||||
constructor() {
|
||||
super.test.whatever;
|
||||
}
|
||||
}
|
||||
3
test/fixtures/classes/no-accessing-super-properties/options.json
vendored
Normal file
3
test/fixtures/classes/no-accessing-super-properties/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "cannot access super properties"
|
||||
}
|
||||
5
test/fixtures/classes/no-calling-super-properties/actual.js
vendored
Normal file
5
test/fixtures/classes/no-calling-super-properties/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
class Test extends Foo {
|
||||
constructor() {
|
||||
super.test.whatever();
|
||||
}
|
||||
}
|
||||
3
test/fixtures/classes/no-calling-super-properties/options.json
vendored
Normal file
3
test/fixtures/classes/no-calling-super-properties/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "cannot access super properties"
|
||||
}
|
||||
5
test/fixtures/computed-property-names/method/actual.js
vendored
Normal file
5
test/fixtures/computed-property-names/method/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var obj = {
|
||||
[foobar]() {
|
||||
return "foobar"
|
||||
}
|
||||
};
|
||||
6
test/fixtures/computed-property-names/method/expected.js
vendored
Normal file
6
test/fixtures/computed-property-names/method/expected.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
var obj = function (obj) {
|
||||
obj[foobar] = function () {
|
||||
return 'foobar';
|
||||
};
|
||||
return obj;
|
||||
}({});
|
||||
4
test/fixtures/constants/block-statement/actual.js
vendored
Normal file
4
test/fixtures/constants/block-statement/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
for (let i in arr) {
|
||||
const MULTIPLIER = 5;
|
||||
console.log(arr[i] * MULTIPLIER);
|
||||
}
|
||||
8
test/fixtures/constants/block-statement/expected.js
vendored
Normal file
8
test/fixtures/constants/block-statement/expected.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
(function () {
|
||||
for (var i in arr) {
|
||||
(function () {
|
||||
var MULTIPLIER = 5;
|
||||
console.log(arr[i] * MULTIPLIER);
|
||||
}());
|
||||
}
|
||||
}());
|
||||
3
test/fixtures/constants/no-assignment/actual.js
vendored
Normal file
3
test/fixtures/constants/no-assignment/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const MULTIPLIER = 5;
|
||||
|
||||
MULTIPLIER = "overwrite";
|
||||
3
test/fixtures/constants/no-assignment/options.json
vendored
Normal file
3
test/fixtures/constants/no-assignment/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "MULTIPLIER is read-only"
|
||||
}
|
||||
3
test/fixtures/constants/no-declaration/actual.js
vendored
Normal file
3
test/fixtures/constants/no-declaration/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
const MULTIPLIER = 5;
|
||||
|
||||
var MULTIPLIER = "overwrite";
|
||||
3
test/fixtures/constants/no-declaration/options.json
vendored
Normal file
3
test/fixtures/constants/no-declaration/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "MULTIPLIER is read-only"
|
||||
}
|
||||
5
test/fixtures/constants/program/actual.js
vendored
Normal file
5
test/fixtures/constants/program/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
const MULTIPLIER = 5;
|
||||
|
||||
for (var i in arr) {
|
||||
console.log(arr[i] * MULTIPLIER);
|
||||
}
|
||||
6
test/fixtures/constants/program/expected.js
vendored
Normal file
6
test/fixtures/constants/program/expected.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
(function () {
|
||||
var MULTIPLIER = 5;
|
||||
for (var i in arr) {
|
||||
console.log(arr[i] * MULTIPLIER);
|
||||
}
|
||||
}());
|
||||
3
test/fixtures/errors/syntax/actual.js
vendored
Normal file
3
test/fixtures/errors/syntax/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
arr.map(function () {
|
||||
return $@!@#;
|
||||
});
|
||||
3
test/fixtures/errors/syntax/options.json
vendored
Normal file
3
test/fixtures/errors/syntax/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Line 2: Unexpected token ILLEGAL"
|
||||
}
|
||||
1
test/fixtures/spread/method-call-array-literal/actual.js
vendored
Normal file
1
test/fixtures/spread/method-call-array-literal/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
f(...[1, 2, 3]);
|
||||
1
test/fixtures/spread/method-call-array-literal/expected.js
vendored
Normal file
1
test/fixtures/spread/method-call-array-literal/expected.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
f.apply(null, [1, 2, 3]);
|
||||
Reference in New Issue
Block a user