Skip to content

Commit

Permalink
Update target Chrome version in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
billyjanitsch committed Oct 6, 2022
1 parent 1cb289f commit f74f067
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
22 changes: 10 additions & 12 deletions __snapshots__/test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,31 @@ exports[`avoids transpiling known precompiled packages given {}, {}: output (esm

exports[`avoids transpiling known precompiled packages given {}, {}: output (production) 1`] = `"export default class React{method(value){return value??2;}}"`;

exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 88"}: input 1`] = `
exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 106"}: input 1`] = `
"import 'core-js/stable'
"
`;

exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 88"}: output (cjs) 1`] = `
exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 106"}: output (cjs) 1`] = `
""use strict";
require("core-js/modules/es.regexp.flags.js");
require("core-js/modules/es.typed-array.set.js");"
`;

exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 88"}: output (development) 1`] = `
exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 106"}: output (development) 1`] = `
"import "core-js/modules/es.regexp.flags.js";
import "core-js/modules/es.typed-array.set.js";
import "core-js/modules/web.immediate.js";"
`;

exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 88"}: output (esm) 1`] = `
exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 106"}: output (esm) 1`] = `
"import "core-js/modules/es.regexp.flags.js";
import "core-js/modules/es.typed-array.set.js";"
`;

exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 88"}: output (production) 1`] = `
exports[`replaces generic polyfill with env-targeted polyfills given {}, {"targets":"Chrome 106"}: output (production) 1`] = `
"import "core-js/modules/es.regexp.flags.js";
import "core-js/modules/es.typed-array.set.js";
import "core-js/modules/web.immediate.js";"
`;

Expand Down Expand Up @@ -1602,7 +1600,7 @@ export default obj;
export { obj };"
`;

exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 88"}: input 1`] = `
exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 106"}: input 1`] = `
"import defaultImport, {namedImport} from 'foo'
import * as namespaceImport from 'bar'
Expand Down Expand Up @@ -1640,7 +1638,7 @@ export {obj}
"
`;

exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 88"}: output (cjs) 1`] = `
exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 106"}: output (cjs) 1`] = `
""use strict";
var _interopRequireWildcard3 = require("@babel/runtime/helpers/interopRequireWildcard").default;
Expand Down Expand Up @@ -1701,7 +1699,7 @@ var _default = obj;
exports.default = _default;"
`;

exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 88"}: output (development) 1`] = `
exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 106"}: output (development) 1`] = `
"import defaultImport, { namedImport } from 'foo';
import * as namespaceImport from 'bar';
const dynamicImport = import('baz');
Expand Down Expand Up @@ -1746,7 +1744,7 @@ export default obj;
export { obj };"
`;

exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 88"}: output (esm) 1`] = `
exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 106"}: output (esm) 1`] = `
"import defaultImport, { namedImport } from 'foo';
import * as namespaceImport from 'bar';
const dynamicImport = import('baz');
Expand Down Expand Up @@ -1791,7 +1789,7 @@ export default obj;
export { obj };"
`;

exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 88"}: output (production) 1`] = `
exports[`transpiles ES2020+ syntax given {}, {"targets":"Chrome 106"}: output (production) 1`] = `
"import defaultImport, { namedImport } from 'foo';
import * as namespaceImport from 'bar';
const dynamicImport = import('baz');
Expand Down
4 changes: 2 additions & 2 deletions test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function macro(title: string, fixture: string, presetOptions = {}, topLevelOptio
}

macro('transpiles ES2020+ syntax', 'syntax.js')
macro('transpiles ES2020+ syntax', 'syntax.js', undefined, {targets: 'Chrome 88'})
macro('transpiles ES2020+ syntax', 'syntax.js', undefined, {targets: 'Chrome 106'})
macro('transpiles ES2020+ syntax', 'syntax.js', {runtime: false})
macro('transpiles ES2020+ syntax', 'syntax.js', {modules: 'commonjs'})
macro('transpiles ES2020+ syntax', 'syntax.js', undefined, {
Expand All @@ -44,7 +44,7 @@ macro('transpiles Emotion', 'emotion.js', {emotion: true})

macro('replaces generic polyfill with env-targeted polyfills', 'polyfills.js')
macro('replaces generic polyfill with env-targeted polyfills', 'polyfills.js', undefined, {
targets: 'Chrome 88',
targets: 'Chrome 106',
})

macro('transpiles ESM in node_modules', 'vendor/node_modules/my-pkg/index.js')
Expand Down

0 comments on commit f74f067

Please sign in to comment.