fix: Users should not be redirected to disabled authentication providers (#5055

* fix: Users should not be redirected to disabled authentication providers
Re-enabled tests in plugin directory

* Fix plugin http tests
This commit is contained in:
Tom Moor
2023-03-18 09:17:54 -04:00
committed by GitHub
parent 6dd4afccaf
commit 41f97b0563
7 changed files with 60 additions and 15 deletions

View File

@@ -53,8 +53,9 @@ api.use(apiWrapper());
api.use(editor());
// register package API routes before others to allow for overrides
const rootDir = env.ENVIRONMENT === "test" ? "" : "build";
glob
.sync("build/plugins/*/server/api/!(*.test).js")
.sync(path.join(rootDir, "plugins/*/server/api/!(*.test).[jt]s"))
.forEach((filePath: string) => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pkg: Router = require(path.join(process.cwd(), filePath)).default;