Browse Source

failing test for module order bug

module-order
Rich-Harris 9 years ago
parent
commit
f4082776d5
  1. 5
      test/function/module-sort-order/_config.js
  2. 20
      test/function/module-sort-order/a.js
  3. 1
      test/function/module-sort-order/b.js
  4. 3
      test/function/module-sort-order/c.js
  5. 4
      test/function/module-sort-order/main.js
  6. 5
      test/function/module-sort-order/z.js

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

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

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

@ -0,0 +1,20 @@
import { b } from './b';
import z from './z';
z();
const p = {
q: function () {
b.nope();
}
};
(function () {
const p = {
q: function () {
b.nope();
}
};
})();
export default 42;

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

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

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

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

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

@ -0,0 +1,4 @@
import a from './a';
import z from './z';
z();

5
test/function/module-sort-order/z.js

@ -0,0 +1,5 @@
import { c } from './c';
export default function () {
c();
}
Loading…
Cancel
Save