add a "spec" transformer namespace for transformers that nicen up code and make it well, more spec compliant
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
var obj = {
|
||||
"foobar": "lol"
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var obj = {
|
||||
foobar: "lol"
|
||||
};
|
||||
1
test/fixtures/transformation/spec-no-duplicate-properties/identifiers/actual.js
vendored
Normal file
1
test/fixtures/transformation/spec-no-duplicate-properties/identifiers/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var obj = { a: 1, a: 2 };
|
||||
1
test/fixtures/transformation/spec-no-duplicate-properties/literals/actual.js
vendored
Normal file
1
test/fixtures/transformation/spec-no-duplicate-properties/literals/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var obj = { "a": 1, "a": 2 };
|
||||
1
test/fixtures/transformation/spec-no-duplicate-properties/mixed/actual.js
vendored
Normal file
1
test/fixtures/transformation/spec-no-duplicate-properties/mixed/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var obj = { a: 1, "a": 2 };
|
||||
3
test/fixtures/transformation/spec-no-duplicate-properties/options.json
vendored
Normal file
3
test/fixtures/transformation/spec-no-duplicate-properties/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Duplicate property key"
|
||||
}
|
||||
3
test/fixtures/transformation/spec-no-for-in-of-assignment/in/actual.js
vendored
Normal file
3
test/fixtures/transformation/spec-no-for-in-of-assignment/in/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
for (var i = 0 in obj) {
|
||||
|
||||
}
|
||||
3
test/fixtures/transformation/spec-no-for-in-of-assignment/of/actual.js
vendored
Normal file
3
test/fixtures/transformation/spec-no-for-in-of-assignment/of/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
for (var i = 0 of obj) {
|
||||
|
||||
}
|
||||
3
test/fixtures/transformation/spec-no-for-in-of-assignment/options.json
vendored
Normal file
3
test/fixtures/transformation/spec-no-for-in-of-assignment/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "No assignments allowed in for-in/of head"
|
||||
}
|
||||
5
test/fixtures/transformation/spec/block-hoist-functions/exec.js
vendored
Normal file
5
test/fixtures/transformation/spec/block-hoist-functions/exec.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
function f() { return 1; }
|
||||
{
|
||||
function f() { return 2; }
|
||||
}
|
||||
assert.equal(f(), 1);
|
||||
Reference in New Issue
Block a user