Skip to content

Commit

Permalink
rbac(feat): add vscode debug test configuration for rbac-backend
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Andriienko <[email protected]>
  • Loading branch information
AndrienkoAleksandr committed Dec 15, 2023
1 parent 4aeb33e commit 9c0cd0b
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "1.0.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest RBAC backend: debug current test file",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": ["${relativeFile}", "--config", "./jest.config.debug.js"],
"console": "integratedTerminal",
"cwd": "${workspaceRoot}/plugins/rbac-backend",
"internalConsoleOptions": "neverOpen",
}
]
}
13 changes: 13 additions & 0 deletions plugins/rbac-backend/jest.config.debug.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
projects: [
{
displayName: 'rbac-backend',
testMatch: ['<rootDir>/**/*.test.ts'],
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': ['ts-jest', { tsconfig: './tsconfig.debug.json' }],
},
},
],
};
3 changes: 2 additions & 1 deletion plugins/rbac-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"@types/supertest": "2.0.16",
"knex-mock-client": "2.0.0",
"msw": "1.3.2",
"supertest": "6.3.3"
"supertest": "6.3.3",
"ts-jest": "^29.1.1"
},
"files": [
"dist",
Expand Down
6 changes: 6 additions & 0 deletions plugins/rbac-backend/tsconfig.debug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": true
}
}
59 changes: 54 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5925,6 +5925,34 @@
"@backstage/config" "^1.1.1"
deep-freeze "^0.0.1"

"@janus-idp/backstage-plugin-rbac-backend@^1.6.4":
version "1.7.1"
resolved "https://registry.yarnpkg.com/@janus-idp/backstage-plugin-rbac-backend/-/backstage-plugin-rbac-backend-1.7.1.tgz#dfcd6bbf5357db3c88f6223d70ab0f6051abed55"
integrity sha512-KWFBfFfmteA//Lq/NH79LHXOCCWBHNsoakSMhaFnACt4R1ChlmgOsg0x56jKpIfE/5RqjYetxEDDhX6Pmx2sWw==
dependencies:
"@backstage/backend-common" "^0.19.8"
"@backstage/backend-plugin-api" "^0.5.4"
"@backstage/catalog-client" "^1.4.5"
"@backstage/catalog-model" "^1.4.3"
"@backstage/config" "^1.1.1"
"@backstage/core-plugin-api" "^1.7.0"
"@backstage/errors" "^1.2.3"
"@backstage/plugin-auth-node" "^0.4.0"
"@backstage/plugin-permission-backend" "^0.5.29"
"@backstage/plugin-permission-common" "^0.7.9"
"@backstage/plugin-permission-node" "^0.7.17"
"@dagrejs/graphlib" "^2.1.13"
"@janus-idp/backstage-plugin-rbac-common" "1.2.0"
casbin "^5.27.1"
express "^4.18.2"
express-promise-router "^4.1.1"
knex "^2.0.0"
lodash "^4.17.21"
qs "^6.11.2"
typeorm-adapter "^1.6.1"
winston "^3.11.0"
yn "^4.0.0"

"@jest/console@^29.7.0":
version "29.7.0"
resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc"
Expand Down Expand Up @@ -14012,6 +14040,13 @@ browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4
node-releases "^2.0.13"
update-browserslist-db "^1.0.13"

[email protected]:
version "0.2.6"
resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8"
integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==
dependencies:
fast-json-stable-stringify "2.x"

[email protected]:
version "2.1.1"
resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05"
Expand Down Expand Up @@ -17563,7 +17598,7 @@ fast-json-patch@^3.0.0-1:
resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947"
integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==

fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
Expand Down Expand Up @@ -20355,7 +20390,7 @@ jest-snapshot@^29.7.0:
pretty-format "^29.7.0"
semver "^7.5.3"

jest-util@^29.7.0:
jest-util@^29.0.0, jest-util@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==
Expand Down Expand Up @@ -21512,7 +21547,7 @@ lodash.isstring@^4.0.1:
resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==

lodash.memoize@^4.1.2:
lodash.memoize@4.x, lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==
Expand Down Expand Up @@ -21717,7 +21752,7 @@ make-dir@^4.0.0:
dependencies:
semver "^7.5.3"

make-error@^1.1.1:
make-error@1.x, make-error@^1.1.1:
version "1.3.6"
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
Expand Down Expand Up @@ -28243,6 +28278,20 @@ ts-interface-checker@^0.1.9:
resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==

ts-jest@^29.1.1:
version "29.1.1"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b"
integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==
dependencies:
bs-logger "0.x"
fast-json-stable-stringify "2.x"
jest-util "^29.0.0"
json5 "^2.2.3"
lodash.memoize "4.x"
make-error "1.x"
semver "^7.5.3"
yargs-parser "^21.0.1"

[email protected]:
version "10.0.0"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be"
Expand Down Expand Up @@ -29985,7 +30034,7 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^20.2.9:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==

yargs-parser@^21.1.1:
yargs-parser@^21.0.1, yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
Expand Down

0 comments on commit 9c0cd0b

Please sign in to comment.