Browse Source

put test where it belongs

gh-1187
Rich-Harris 8 years ago
parent
commit
7e717779ff
  1. 6
      test/cli/sourcemap-file/_config.js
  2. 2
      test/cli/sourcemap-file/_expected/bundle.js
  3. 1
      test/cli/sourcemap-file/_expected/bundle.js.map
  4. 15
      test/sourcemaps/sourcemap-file/_config.js
  5. 6
      test/sourcemaps/sourcemap-file/_expected/bundle.amd.js
  6. 1
      test/sourcemaps/sourcemap-file/_expected/bundle.amd.js.map
  7. 4
      test/sourcemaps/sourcemap-file/_expected/bundle.cjs.js
  8. 1
      test/sourcemaps/sourcemap-file/_expected/bundle.cjs.js.map
  9. 2
      test/sourcemaps/sourcemap-file/_expected/bundle.es.js
  10. 1
      test/sourcemaps/sourcemap-file/_expected/bundle.es.js.map
  11. 7
      test/sourcemaps/sourcemap-file/_expected/bundle.iife.js
  12. 1
      test/sourcemaps/sourcemap-file/_expected/bundle.iife.js.map
  13. 10
      test/sourcemaps/sourcemap-file/_expected/bundle.umd.js
  14. 1
      test/sourcemaps/sourcemap-file/_expected/bundle.umd.js.map
  15. 0
      test/sourcemaps/sourcemap-file/main.js
  16. 2
      test/test.js

6
test/cli/sourcemap-file/_config.js

@ -1,6 +0,0 @@
const assert = require( 'assert' );
module.exports = {
description: 'populates file property of sourcemap (#986)',
command: 'rollup -i main.js -o _actual/bundle.js -m'
};

2
test/cli/sourcemap-file/_expected/bundle.js

@ -1,2 +0,0 @@
console.log( 42 );
//# sourceMappingURL=bundle.js.map

1
test/cli/sourcemap-file/_expected/bundle.js.map

@ -1 +0,0 @@
{"version":3,"file":"bundle.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC"}

15
test/sourcemaps/sourcemap-file/_config.js

@ -0,0 +1,15 @@
const assert = require( 'assert' );
module.exports = {
description: 'populates file property of sourcemap when plugins are used (#986)',
options: {
plugins: [
{
transform () {}
}
]
},
test: ( code, map, profile ) => {
assert.equal( map.file, `bundle.${profile.format}.js` );
}
};

6
test/sourcemaps/sourcemap-file/_expected/bundle.amd.js

@ -0,0 +1,6 @@
define(function () { 'use strict';
console.log( 42 );
});
//# sourceMappingURL=bundle.amd.js.map

1
test/sourcemaps/sourcemap-file/_expected/bundle.amd.js.map

@ -0,0 +1 @@
{"version":3,"file":"bundle.amd.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,;;"}

4
test/sourcemaps/sourcemap-file/_expected/bundle.cjs.js

@ -0,0 +1,4 @@
'use strict';
console.log( 42 );
//# sourceMappingURL=bundle.cjs.js.map

1
test/sourcemaps/sourcemap-file/_expected/bundle.cjs.js.map

@ -0,0 +1 @@
{"version":3,"file":"bundle.cjs.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC"}

2
test/sourcemaps/sourcemap-file/_expected/bundle.es.js

@ -0,0 +1,2 @@
console.log( 42 );
//# sourceMappingURL=bundle.es.js.map

1
test/sourcemaps/sourcemap-file/_expected/bundle.es.js.map

@ -0,0 +1 @@
{"version":3,"file":"bundle.es.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC"}

7
test/sourcemaps/sourcemap-file/_expected/bundle.iife.js

@ -0,0 +1,7 @@
(function () {
'use strict';
console.log( 42 );
}());
//# sourceMappingURL=bundle.iife.js.map

1
test/sourcemaps/sourcemap-file/_expected/bundle.iife.js.map

@ -0,0 +1 @@
{"version":3,"file":"bundle.iife.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;;AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,;;"}

10
test/sourcemaps/sourcemap-file/_expected/bundle.umd.js

@ -0,0 +1,10 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
console.log( 42 );
})));
//# sourceMappingURL=bundle.umd.js.map

1
test/sourcemaps/sourcemap-file/_expected/bundle.umd.js.map

@ -0,0 +1 @@
{"version":3,"file":"bundle.umd.js","sources":["../main.js"],"sourcesContent":["console.log( 42 );\n"],"names":[],"mappings":";;;;;;AAAA,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,;;"}

0
test/cli/sourcemap-file/main.js → test/sourcemaps/sourcemap-file/main.js

2
test/test.js

@ -461,7 +461,7 @@ describe( 'rollup', function () {
if ( config.test ) {
const { code, map } = bundle.generate( options );
config.test( code, map );
config.test( code, map, profile );
}
if ( config.warnings ) {

Loading…
Cancel
Save