chore: add babel config for debugging (wip)
MODIFY
.vscode/launch.json
.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
+ {
+ "args": [
+ "--require",
+ "@babel/register",
+ "--timeout",
+ "999999",
+ "--colors",
+ "${file}"
+ ],
+ "internalConsoleOptions": "openOnSessionStart",
+ "name": "Test - Current File",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "request": "launch",
+ "skipFiles": ["<node_internals>/**"],
+ "type": "pwa-node"
+ },
{
"name": "Debug",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
- "args": [
- "."
- ]
+ "args": ["."]
},
{
"name": "Attach Debug",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
"args": [
- "--require", "babel-core/register",
- "--timeout", "999999",
+ "--require",
+ "@babel/register",
+ "--timeout",
+ "999999",
"--colors",
- "${workspaceFolder}/test"
- ]
- },
- {
- "name": "Test Current File",
- "type": "node",
- "request": "launch",
- "program": "${workspaceFolder}/node_modules/.bin/_mocha",
- "args": [
- "--require", "babel-core/register",
- "--timeout", "999999",
- "--colors",
- "${file}"
+ "${workspaceFolder}/packages/appium/test"
]
}
]

ADD
babel.config.json
+{
+ "presets": [
+ [
+ "@babel/preset-env",
+ {
+ "targets": {
+ "node": "10"
+ }
+ }
+ ]
+ ],
+ "plugins": [
+ "source-map-support",
+ "@babel/plugin-transform-runtime",
+ "@babel/plugin-syntax-bigint",
+ "@babel/plugin-proposal-nullish-coalescing-operator",
+ "@babel/plugin-proposal-numeric-separator",
+ "@babel/plugin-proposal-optional-chaining",
+ ["@babel/plugin-proposal-private-methods", {"loose": true}],
+ ["@babel/plugin-proposal-class-properties", {"loose": true}]
+ ],
+ "comments": false,
+ "sourceMaps": "both",
+ "env": {
+ "coverage": {
+ "plugins": [
+ [
+ "istanbul",
+ {
+ "exclude": [
+ "test",
+ "build"
+ ]
+ }
+ ]
+ ]
+ }
+ }
+}

MODIFY
package.json
package.json
],
"devDependencies": {
"@appium/fake-plugin": "^1.0.0",
+ "@babel/register": "^7.13.16",
"appium-fake-driver": "^2.0.1",
"appium-gulp-plugins": "^5.2.1",
"chai": "4.x",

chore: add babel config for debugging (wip)