Skip to content

Commit

Permalink
test: update the test server to work with the next node version
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Mar 18, 2024
1 parent cd2a756 commit 52e84f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased]

## [4.1.1] - 2024-03-14

- Support for new FDI version - 1.19
- Update test server to work with new node server versions

## [4.1.0] - 2024-01-03

Expand Down
10 changes: 10 additions & 0 deletions TestingApp/test/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ try {
multitenancySupported = false;
}

let UserMetaDataRecipeRaw;
try {
UserMetaDataRecipeRaw = require("supertokens-node/lib/build/recipe/usermetadata/recipe").default;
} catch {
// Ignored
}

let generalErrorSupported;

if (maxVersion(nodeSDKVersion, "10.0.0") === nodeSDKVersion) {
Expand Down Expand Up @@ -283,6 +290,9 @@ app.post("/startST", async (req, res) => {
MultitenancyRaw.reset();
}

if (UserMetaDataRecipeRaw !== undefined) {
UserMetaDataRecipeRaw.reset();
}
SuperTokens.init(getConfig(enableAntiCsrf, enableJWT));
}
let pid = await startST();
Expand Down

0 comments on commit 52e84f8

Please sign in to comment.