Skip to content

Commit

Permalink
fix: test server
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Aug 14, 2024
1 parent aac041d commit 7b92185
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/test-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ import TOTPRoutes from "./totp";
import { getFunc, resetOverrideParams, getOverrideParams } from "./testFunctionMapper";
import OverrideableBuilder from "supertokens-js-override";
import { resetOverrideLogs, logOverrideEvent, getOverrideLogs } from "./overrideLogging";
import Dashboard from "../../../recipe/dashboard";
import DashboardRecipe from "../../../lib/build/recipe/dashboard/recipe";

const { logDebugMessage } = logger("com.supertokens:node-test-server");

Expand All @@ -63,7 +65,12 @@ function defaultSTInit() {
supertokens: {
connectionURI: process.env.ST_CONNECTION_URI || "http://localhost:8080",
},
recipeList: [Session.init()],
recipeList: [
Session.init(),
Dashboard.init({
apiKey: "test",
}),
],
});
}

Expand All @@ -85,12 +92,17 @@ function STReset() {
MultiFactorAuthRecipe.reset();
TOTPRecipe.reset();
SuperTokensRecipe.reset();
DashboardRecipe.reset();
}

function initST(config: any) {
STReset();

const recipeList: RecipeListFunction[] = [];
const recipeList: RecipeListFunction[] = [
Dashboard.init({
apiKey: "test",
}),
];

const parsedConfig = JSON.parse(config);
const init = {
Expand Down

0 comments on commit 7b92185

Please sign in to comment.