Browse Source

move shorthand props test from function to form, for benefit of node 0.12

contingency-plan
Rich Harris 9 years ago
parent
commit
946cbbbdfe
  1. 0
      test/form/shorthand-properties/_config.js
  2. 19
      test/form/shorthand-properties/_expected/amd.js
  3. 17
      test/form/shorthand-properties/_expected/cjs.js
  4. 15
      test/form/shorthand-properties/_expected/es6.js
  5. 19
      test/form/shorthand-properties/_expected/iife.js
  6. 23
      test/form/shorthand-properties/_expected/umd.js
  7. 0
      test/form/shorthand-properties/baz.js
  8. 0
      test/form/shorthand-properties/foo.js
  9. 0
      test/form/shorthand-properties/main.js
  10. 2
      test/function/module-sort-order/_config.js
  11. 4
      test/function/module-sort-order/a.js
  12. 2
      test/function/module-sort-order/b.js
  13. 2
      test/function/module-sort-order/c.js

0
test/function/shorthand-properties/_config.js → test/form/shorthand-properties/_config.js

19
test/form/shorthand-properties/_expected/amd.js

@ -0,0 +1,19 @@
define(function () { 'use strict';
function bar$1 () {
return 'main-bar';
}
function bar () {
return 'foo-bar';
}
var foo = {
bar,
baz: bar$1
};
assert.equal( bar$1(), 'main-bar' );
assert.equal( foo.bar(), 'foo-bar' );
});

17
test/form/shorthand-properties/_expected/cjs.js

@ -0,0 +1,17 @@
'use strict';
function bar$1 () {
return 'main-bar';
}
function bar () {
return 'foo-bar';
}
var foo = {
bar,
baz: bar$1
};
assert.equal( bar$1(), 'main-bar' );
assert.equal( foo.bar(), 'foo-bar' );

15
test/form/shorthand-properties/_expected/es6.js

@ -0,0 +1,15 @@
function bar$1 () {
return 'main-bar';
}
function bar () {
return 'foo-bar';
}
var foo = {
bar,
baz: bar$1
};
assert.equal( bar$1(), 'main-bar' );
assert.equal( foo.bar(), 'foo-bar' );

19
test/form/shorthand-properties/_expected/iife.js

@ -0,0 +1,19 @@
(function () { 'use strict';
function bar$1 () {
return 'main-bar';
}
function bar () {
return 'foo-bar';
}
var foo = {
bar,
baz: bar$1
};
assert.equal( bar$1(), 'main-bar' );
assert.equal( foo.bar(), 'foo-bar' );
})();

23
test/form/shorthand-properties/_expected/umd.js

@ -0,0 +1,23 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
factory();
}(this, function () { 'use strict';
function bar$1 () {
return 'main-bar';
}
function bar () {
return 'foo-bar';
}
var foo = {
bar,
baz: bar$1
};
assert.equal( bar$1(), 'main-bar' );
assert.equal( foo.bar(), 'foo-bar' );
}));

0
test/function/shorthand-properties/baz.js → test/form/shorthand-properties/baz.js

0
test/function/shorthand-properties/foo.js → test/form/shorthand-properties/foo.js

0
test/function/shorthand-properties/main.js → test/form/shorthand-properties/main.js

2
test/function/module-sort-order/_config.js

@ -1,5 +1,3 @@
module.exports = { module.exports = {
// solo: true,
// show: true,
description: 'module sorter is not confused by top-level call expressions' description: 'module sorter is not confused by top-level call expressions'
}; };

4
test/function/module-sort-order/a.js

@ -3,14 +3,14 @@ import z from './z';
z(); z();
const p = { var p = {
q: function () { q: function () {
b.nope(); b.nope();
} }
}; };
(function () { (function () {
const p = { var p = {
q: function () { q: function () {
b.nope(); b.nope();
} }

2
test/function/module-sort-order/b.js

@ -1 +1 @@
export const b = function () {}; export var b = function () {};

2
test/function/module-sort-order/c.js

@ -1,3 +1,3 @@
import { b } from './b'; import { b } from './b';
export const c = function () {}; export var c = function () {};

Loading…
Cancel
Save