mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
switch modern-tests to use SWC instead of Babel for faster builds and simpler configuration
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
// This is needed to handle ES modules
|
||||
sourceType: 'unambiguous',
|
||||
};
|
||||
@@ -11,9 +11,14 @@ module.exports = {
|
||||
transformIgnorePatterns: [
|
||||
"/node_modules/(?!(execa|wait-on|is-docker|is-stream|human-signals|merge-stream|npm-run-path|onetime|mimic-fn|strip-final-newline|path-key|shebug-command|shebug-regex)/)"
|
||||
],
|
||||
// Use Babel to transform JavaScript files
|
||||
transform: {
|
||||
"^.+\\.js$": "babel-jest"
|
||||
"^.+\\.js$": ["@swc/jest", {
|
||||
jsc: {
|
||||
parser: { syntax: "ecmascript" },
|
||||
target: "es2022",
|
||||
},
|
||||
module: { type: "commonjs" },
|
||||
}],
|
||||
},
|
||||
// Playwright configuration
|
||||
globals: {
|
||||
|
||||
1767
tools/modern-tests/package-lock.json
generated
1767
tools/modern-tests/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,8 +6,8 @@
|
||||
"test": "jest --config jest.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.21.3",
|
||||
"babel-jest": "^29.0.0",
|
||||
"@swc/core": "^1.15.18",
|
||||
"@swc/jest": "^0.2.39",
|
||||
"cheerio": "^1.0.0-rc.12",
|
||||
"execa": "^5.1.1",
|
||||
"fs-extra": "^11.3.1",
|
||||
|
||||
@@ -116,8 +116,9 @@ describe('Meteor Skeletons /', () => {
|
||||
test: 'tests/main.js',
|
||||
},
|
||||
bodyStyles: {
|
||||
'font-family':
|
||||
'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
||||
'font-family': process.platform === 'darwin'
|
||||
? 'Inter, -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif'
|
||||
: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
||||
padding: '10px',
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user