Skip to content

Commit

Permalink
test: add vscode debug config (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Feb 12, 2023
1 parent 045615d commit 6b1a92d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 6 deletions.
40 changes: 40 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Egg Debug",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev",
"--",
"--inspect-brk"
],
"console": "integratedTerminal",
"restart": true,
"protocol": "auto",
"port": 9229,
"autoAttachChildProcesses": true
},
{
"type": "node",
"request": "launch",
"name": "Egg Test",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"test-local",
"--",
"--inspect-brk"
],
"protocol": "auto",
"port": 9229,
"autoAttachChildProcesses": true
}
]
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@
"scripts": {
"contributor": "git-contributor",
"dev": "DEBUG_LOCAL_SQL=true egg-bin dev",
"debug": "egg-bin debug",
"lint": "eslint --cache --ext .ts .",
"lint:fix": "eslint --cache --ext .ts --fix .",
"test": "npm run lint:fix && npm run test-local",
"prepare-database": "rm -rf dist && ts-node test/prepare.ts",
"test-local": "npm run prepare-database && egg-bin test --full-trace",
"t": "npm run lint:fix && npm run prepare-database && egg-bin test --changed --full-trace",
"cov": "npm run prepare-database && egg-bin cov --full-trace",
"test-local": "npm run prepare-database && egg-bin test",
"t": "npm run lint:fix && npm run prepare-database && egg-bin test --changed",
"cov": "npm run prepare-database && egg-bin cov",
"ci": "npm run lint && npm run cov && npm run tsc:prod",
"clean": "tsc -b --clean && rm -rf dist",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
Expand Down Expand Up @@ -100,11 +99,12 @@
"validate-npm-package-name": "^3.0.0"
},
"devDependencies": {
"@swc/core": "^1.3.35",
"@types/mocha": "^10.0.1",
"@types/mysql": "^2.15.21",
"@types/semver": "^7.3.12",
"coffee": "^5.4.0",
"egg-bin": "^5.9.0",
"egg-bin": "5",
"egg-mock": "^5.0.1",
"eslint": "^8.29.0",
"eslint-config-egg": "^12.1.0",
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
},
"exclude": [
"node_modules"
]
],
"ts-node": {
"tsc": true
}
}

0 comments on commit 6b1a92d

Please sign in to comment.