Skip to content

Commit

Permalink
tests: Split example test cases into separate files.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Feb 16, 2021
1 parent fe58536 commit 9580031
Show file tree
Hide file tree
Showing 11 changed files with 14,594 additions and 14,562 deletions.
14,454 changes: 0 additions & 14,454 deletions tests/__snapshots__/outputs.test.ts.snap

Large diffs are not rendered by default.

1,201 changes: 1,201 additions & 0 deletions tests/examples/__snapshots__/asyncAwait.test.ts.snap

Large diffs are not rendered by default.

1,009 changes: 1,009 additions & 0 deletions tests/examples/__snapshots__/generators.test.ts.snap

Large diffs are not rendered by default.

11,942 changes: 11,942 additions & 0 deletions tests/examples/__snapshots__/nodePolyfills.test.ts.snap

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions tests/examples/__snapshots__/sourceMaps.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,306 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Source maps transforms example test case 1`] = `
Array [
"/cjs/index-node-current-cjs.cjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: current, Format: cjs
'use strict';
//# sourceMappingURL=index-node-current-cjs.cjs.map
",
]
`;

exports[`Source maps transforms example test case 2`] = `
Array [
"/cjs/index-node-experimental-cjs.cjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: experimental, Format: cjs
'use strict';
//# sourceMappingURL=index-node-experimental-cjs.cjs.map
",
]
`;

exports[`Source maps transforms example test case 3`] = `
Array [
"/cjs/index-node-legacy-cjs.cjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: legacy, Format: cjs
'use strict';
//# sourceMappingURL=index-node-legacy-cjs.cjs.map
",
]
`;

exports[`Source maps transforms example test case 4`] = `
Array [
"/cjs/index-node-stable-cjs.cjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: stable, Format: cjs
'use strict';
//# sourceMappingURL=index-node-stable-cjs.cjs.map
",
]
`;

exports[`Source maps transforms example test case 5`] = `
Array [
"/esm/index-browser-current-esm.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: current, Format: esm
//# sourceMappingURL=index-browser-current-esm.js.map
",
]
`;

exports[`Source maps transforms example test case 6`] = `
Array [
"/esm/index-browser-experimental-esm.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: experimental, Format: esm
//# sourceMappingURL=index-browser-experimental-esm.js.map
",
]
`;

exports[`Source maps transforms example test case 7`] = `
Array [
"/esm/index-browser-legacy-esm.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: legacy, Format: esm
//# sourceMappingURL=index-browser-legacy-esm.js.map
",
]
`;

exports[`Source maps transforms example test case 8`] = `
Array [
"/esm/index-browser-stable-esm.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: stable, Format: esm
//# sourceMappingURL=index-browser-stable-esm.js.map
",
]
`;

exports[`Source maps transforms example test case 9`] = `
Array [
"/lib/index-browser-current-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: current, Format: lib
'use strict';
//# sourceMappingURL=index-browser-current-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 10`] = `
Array [
"/lib/index-browser-experimental-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: experimental, Format: lib
'use strict';
//# sourceMappingURL=index-browser-experimental-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 11`] = `
Array [
"/lib/index-browser-legacy-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: legacy, Format: lib
'use strict';
//# sourceMappingURL=index-browser-legacy-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 12`] = `
Array [
"/lib/index-browser-stable-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: stable, Format: lib
'use strict';
//# sourceMappingURL=index-browser-stable-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 13`] = `
Array [
"/lib/index-native-current-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: native, Support: current, Format: lib
'use strict';
//# sourceMappingURL=index-native-current-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 14`] = `
Array [
"/lib/index-native-experimental-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: native, Support: experimental, Format: lib
'use strict';
//# sourceMappingURL=index-native-experimental-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 15`] = `
Array [
"/lib/index-native-legacy-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: native, Support: legacy, Format: lib
'use strict';
//# sourceMappingURL=index-native-legacy-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 16`] = `
Array [
"/lib/index-native-stable-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: native, Support: stable, Format: lib
'use strict';
//# sourceMappingURL=index-native-stable-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 17`] = `
Array [
"/lib/index-node-current-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: current, Format: lib
'use strict';
//# sourceMappingURL=index-node-current-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 18`] = `
Array [
"/lib/index-node-experimental-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: experimental, Format: lib
'use strict';
//# sourceMappingURL=index-node-experimental-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 19`] = `
Array [
"/lib/index-node-legacy-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: legacy, Format: lib
'use strict';
//# sourceMappingURL=index-node-legacy-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 20`] = `
Array [
"/lib/index-node-stable-lib.js",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: stable, Format: lib
'use strict';
//# sourceMappingURL=index-node-stable-lib.js.map
",
]
`;

exports[`Source maps transforms example test case 21`] = `
Array [
"/mjs/index-node-current-mjs.mjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: current, Format: mjs
//# sourceMappingURL=index-node-current-mjs.mjs.map
",
]
`;

exports[`Source maps transforms example test case 22`] = `
Array [
"/mjs/index-node-experimental-mjs.mjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: experimental, Format: mjs
//# sourceMappingURL=index-node-experimental-mjs.mjs.map
",
]
`;

exports[`Source maps transforms example test case 23`] = `
Array [
"/mjs/index-node-legacy-mjs.mjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: legacy, Format: mjs
//# sourceMappingURL=index-node-legacy-mjs.mjs.map
",
]
`;

exports[`Source maps transforms example test case 24`] = `
Array [
"/mjs/index-node-stable-mjs.mjs",
"// Generated with Packemon: https://packemon.dev
// Platform: node, Support: stable, Format: mjs
//# sourceMappingURL=index-node-stable-mjs.mjs.map
",
]
`;

exports[`Source maps transforms example test case 25`] = `
Array [
"/package.json",
Object {
"name": "examples",
},
]
`;

exports[`Source maps transforms example test case 26`] = `
Array [
"/umd/index-browser-current-umd.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: current, Format: umd
//# sourceMappingURL=index-browser-current-umd.js.map
",
]
`;

exports[`Source maps transforms example test case 27`] = `
Array [
"/umd/index-browser-experimental-umd.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: experimental, Format: umd
//# sourceMappingURL=index-browser-experimental-umd.js.map
",
]
`;

exports[`Source maps transforms example test case 28`] = `
Array [
"/umd/index-browser-legacy-umd.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: legacy, Format: umd
//# sourceMappingURL=index-browser-legacy-umd.js.map
",
]
`;

exports[`Source maps transforms example test case 29`] = `
Array [
"/umd/index-browser-stable-umd.js",
"// Generated with Packemon: https://packemon.dev
// Platform: browser, Support: stable, Format: umd
//# sourceMappingURL=index-browser-stable-umd.js.map
",
]
`;
5 changes: 5 additions & 0 deletions tests/examples/asyncAwait.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { testExampleOutput } from '../helpers';

describe('Async/await', () => {
testExampleOutput('async-await.ts');
});
5 changes: 5 additions & 0 deletions tests/examples/generators.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { testExampleOutput } from '../helpers';

describe('Generators', () => {
testExampleOutput('generators.ts');
});
5 changes: 5 additions & 0 deletions tests/examples/nodePolyfills.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { testExampleOutput } from '../helpers';

describe('Node polyfills', () => {
testExampleOutput('node-polyfills.ts');
});
5 changes: 5 additions & 0 deletions tests/examples/sourceMaps.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { testExampleOutput } from '../helpers';

describe('Source maps', () => {
testExampleOutput('source-maps.ts');
});
Loading

0 comments on commit 9580031

Please sign in to comment.