Skip to content

Commit

Permalink
fix: adjust tsconfig and tests to keycloak-js update
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Oct 18, 2024
1 parent 462556c commit 62715fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
},
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!(ol|@babel|jest-runtime|@terrestris|color-*|query-string|' +
'decode-uri-component|split-on-first|filter-obj|geostyler-openlayers-parser|geostyler-style))'
'decode-uri-component|split-on-first|filter-obj|geostyler-openlayers-parser|geostyler-style|keycloak-js))'
],
testRegex: '/src/.*\\.spec.(ts|js)$',
collectCoverageFrom: [
Expand Down
6 changes: 5 additions & 1 deletion src/service/PermissionService/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ describe('PermissionService', () => {
let service: PermissionService;

beforeEach(() => {
const keycloak: Keycloak = new Keycloak();
const keycloak: Keycloak = new Keycloak({
clientId: 'EXAMPLE',
realm: 'EXAMPLE',
url: 'https://example.com/auth'
});
keycloak.token = 'ThisIsNotAValidBearerToken';

service = new PermissionService({
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "ESNext", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "Bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand Down

0 comments on commit 62715fc

Please sign in to comment.