Skip to content

Commit

Permalink
fix mercury unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andypf committed Nov 29, 2022
1 parent ca7fac2 commit 4d6d2c3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apis/mercury/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const schema = require("./graphql/schema")
const { verifyAuthToken } = require("./lib/identityProvider")

// Policy engine
const policyEngine = require("policy-engine")(require("../config/policy.json"))
const config = require("../config/policy.json")
const policyEngine = require("policy-engine").default(config)

// User
const { User } = require("./db/models")
Expand Down
2 changes: 1 addition & 1 deletion apis/mercury/tests/controllers/processingSteps.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const db = require("../../src/db/models")
const ProcessingStepsController = require("../../src/controllers/processingSteps")
const policyEngine = require("policy-engine")(
const policyEngine = require("policy-engine").default(
require("../../config/policy.json")
)

Expand Down
2 changes: 1 addition & 1 deletion apis/mercury/tests/controllers/requests.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const db = require("../../src/db/models")
const RequestsController = require("../../src/controllers/requests")
const policyEngine = require("policy-engine")(
const policyEngine = require("policy-engine").default(
require("../../config/policy.json")
)
const { Op } = require("sequelize")
Expand Down
2 changes: 1 addition & 1 deletion apis/mercury/tests/controllers/users.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const db = require("../../src/db/models")
const UsersController = require("../../src/controllers/users")
const policyEngine = require("policy-engine")(
const policyEngine = require("policy-engine").default(
require("../../config/policy.json")
)

Expand Down
2 changes: 1 addition & 1 deletion apis/mercury/tests/graphql/resolvers.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const db = require("../../src/db/models")
const resolvers = require("../../src/graphql/resolvers")
const policyEngine = require("policy-engine")(
const policyEngine = require("policy-engine").default(
require("../../config/policy.json")
)

Expand Down

0 comments on commit 4d6d2c3

Please sign in to comment.