No description
  • TypeScript 100%
Find a file
2026-06-23 17:25:03 +05:30
.vscode Initial Commit 2026-03-13 10:14:22 +05:30
src SH-192 changed entra tenant name env variable to entra tenant in definition 2026-06-23 17:25:03 +05:30
test SH-181 Log fetch updated in Evalvm, Test case preparation updated 2026-05-14 18:09:03 +05:30
.env.example SH-181 Service Worker updated, README updated 2026-05-13 19:21:47 +05:30
.gitignore Initial Commit 2026-03-13 10:14:22 +05:30
.oxfmtrc.json Initial Commit 2026-03-13 10:14:22 +05:30
bun.lock SH-181 Base Test Setup added 2026-05-13 13:09:26 +05:30
package.json SH-181 Base Test Setup added 2026-05-13 13:09:26 +05:30
README.md SH-181 Log fetch updated in Evalvm, Test case preparation updated 2026-05-14 18:09:03 +05:30
tsconfig.json SH-181 Base Test Setup added 2026-05-13 13:09:26 +05:30

Entra ID Connector

Pre-requisites

Structure

  • Node List is operation nodes used in workflow.
  • Global Env is global environment variables used in workflow.
  • Resources is resources used in workflow and being used by onboarding wizard.

Validate Secret

To validate secret in Connector Workflow Onboarding, call the validator with code-engine.

URL: http://code-engine:3000/api/execute/sync
Method: POST
Body:
{
    "code": "<code from validator file>",
    "context": [
        {
            "key": "WorkflowContext",
            "value": {
               "input": {
                    "ENTRA_TENANT": "<entra-tenant>",
                    "ENTRA_CLIENT_ID": "<entra-client-id>",
                    "ENTRA_CLIENT_SECRET": "<entra-client-secret>"
                }
            }
        }
    ]
}

Test

Operation node suites are added in suites directory.

bun run test
bun run test ./test/suites/{nodeName}.test.ts

Test suite using Mock implementation of code-engine using node:vm for running untrusted code. It also mocks WorkflowContext and WorkflowSDK. For WorkflowSDK Mock and Stub, test bed uses msw (Mock Service Worker) to mock outgoing HTTP/Websocket calls using network interceptors

Test Case structure

High level structure follows the same testing architecture using bun:test test runner. Always prepare the environment for test case using beforeAll or beforeEach to mock / stub dependency and adjust the environment for test case.

beforeAll(() => {
  // Create the entity
  // Update flags in system
  // Setup msw interceptors
});
afterAll(() => {
  // Cleanup the entity
  // Reset flags in system
  // Reset msw interceptors
});

Test Case Secrets

Add all the secrets in Environment Variables (.env file).