Browse Source

add test

rollup-init
Rich-Harris 8 years ago
parent
commit
4ed3909d71
  1. 3
      test/form/comment-before-import/_config.js
  2. 12
      test/form/comment-before-import/_expected/amd.js
  3. 10
      test/form/comment-before-import/_expected/cjs.js
  4. 8
      test/form/comment-before-import/_expected/es.js
  5. 13
      test/form/comment-before-import/_expected/iife.js
  6. 16
      test/form/comment-before-import/_expected/umd.js
  7. 2
      test/form/comment-before-import/bar.js
  8. 4
      test/form/comment-before-import/foo.js
  9. 4
      test/form/comment-before-import/main.js

3
test/form/comment-before-import/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'preserves comments before imports'
};

12
test/form/comment-before-import/_expected/amd.js

@ -0,0 +1,12 @@
define(function () { 'use strict';
// bar.js
var bar = 21;
// foo.js
var foo = bar * 2;
// main.js
console.log( foo );
});

10
test/form/comment-before-import/_expected/cjs.js

@ -0,0 +1,10 @@
'use strict';
// bar.js
var bar = 21;
// foo.js
var foo = bar * 2;
// main.js
console.log( foo );

8
test/form/comment-before-import/_expected/es.js

@ -0,0 +1,8 @@
// bar.js
var bar = 21;
// foo.js
var foo = bar * 2;
// main.js
console.log( foo );

13
test/form/comment-before-import/_expected/iife.js

@ -0,0 +1,13 @@
(function () {
'use strict';
// bar.js
var bar = 21;
// foo.js
var foo = bar * 2;
// main.js
console.log( foo );
}());

16
test/form/comment-before-import/_expected/umd.js

@ -0,0 +1,16 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
// bar.js
var bar = 21;
// foo.js
var foo = bar * 2;
// main.js
console.log( foo );
})));

2
test/form/comment-before-import/bar.js

@ -0,0 +1,2 @@
// bar.js
export default 21;

4
test/form/comment-before-import/foo.js

@ -0,0 +1,4 @@
// foo.js
import bar from './bar.js';
export default bar * 2;

4
test/form/comment-before-import/main.js

@ -0,0 +1,4 @@
// main.js
import foo from './foo.js';
console.log( foo );
Loading…
Cancel
Save