Browse Source

add test for #esperanto/187

contingency-plan
Rich-Harris 9 years ago
parent
commit
680a8e5cb1
  1. 8
      test/form/preserves-comments-after-imports/_config.js
  2. 9
      test/form/preserves-comments-after-imports/_expected/amd.js
  3. 7
      test/form/preserves-comments-after-imports/_expected/cjs.js
  4. 7
      test/form/preserves-comments-after-imports/_expected/es6.js
  5. 9
      test/form/preserves-comments-after-imports/_expected/iife.js
  6. 13
      test/form/preserves-comments-after-imports/_expected/umd.js
  7. 8
      test/form/preserves-comments-after-imports/main.js
  8. 6
      test/form/preserves-comments-after-imports/number.js

8
test/form/preserves-comments-after-imports/_config.js

@ -0,0 +1,8 @@
module.exports = {
description: 'preserves comments between imports and first statement',
options: {
moduleName: 'myBundle'
}
};
// https://github.com/esperantojs/esperanto/issues/187

9
test/form/preserves-comments-after-imports/_expected/amd.js

@ -0,0 +1,9 @@
define(['exports'], function (exports) { 'use strict';
/** A comment for a number */
var number = 5;
/** A comment for obj */
exports.obj = { number };
});

7
test/form/preserves-comments-after-imports/_expected/cjs.js

@ -0,0 +1,7 @@
'use strict';
/** A comment for a number */
var number = 5;
/** A comment for obj */
exports.obj = { number };

7
test/form/preserves-comments-after-imports/_expected/es6.js

@ -0,0 +1,7 @@
/** A comment for a number */
var number = 5;
/** A comment for obj */
var obj = { number };
export { obj };

9
test/form/preserves-comments-after-imports/_expected/iife.js

@ -0,0 +1,9 @@
(function (exports) { 'use strict';
/** A comment for a number */
var number = 5;
/** A comment for obj */
exports.obj = { number };
})((this.myBundle = {}));

13
test/form/preserves-comments-after-imports/_expected/umd.js

@ -0,0 +1,13 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
factory((global.myBundle = {}));
}(this, function (exports) { 'use strict';
/** A comment for a number */
var number = 5;
/** A comment for obj */
exports.obj = { number };
}));

8
test/form/preserves-comments-after-imports/main.js

@ -0,0 +1,8 @@
import { number } from './number.js';
/** A comment for obj */
var obj = { number };
export {
obj
};

6
test/form/preserves-comments-after-imports/number.js

@ -0,0 +1,6 @@
/** A comment for a number */
var number = 5;
export {
number
};
Loading…
Cancel
Save