Exporting environment variables Exporting CI Exporting DISPLAY Exporting NODE_ENV Exporting PAGER Exporting SEMAPHORE Exporting SEMAPHORE_AGENT_MACHINE_ENVIRONMENT_TYPE Exporting SEMAPHORE_AGENT_MACHINE_OS_IMAGE Exporting SEMAPHORE_AGENT_MACHINE_TYPE Exporting SEMAPHORE_ARTIFACT_TOKEN Exporting SEMAPHORE_CACHE_BACKEND Exporting SEMAPHORE_CACHE_PRIVATE_KEY_PATH Exporting SEMAPHORE_CACHE_URL Exporting SEMAPHORE_CACHE_USERNAME Exporting SEMAPHORE_GIT_BRANCH Exporting SEMAPHORE_GIT_COMMITTER Exporting SEMAPHORE_GIT_COMMIT_AUTHOR Exporting SEMAPHORE_GIT_COMMIT_RANGE Exporting SEMAPHORE_GIT_DIR Exporting SEMAPHORE_GIT_PROVIDER Exporting SEMAPHORE_GIT_PR_BRANCH Exporting SEMAPHORE_GIT_PR_NAME Exporting SEMAPHORE_GIT_PR_NUMBER Exporting SEMAPHORE_GIT_PR_SHA Exporting SEMAPHORE_GIT_PR_SLUG Exporting SEMAPHORE_GIT_REF Exporting SEMAPHORE_GIT_REF_TYPE Exporting SEMAPHORE_GIT_REPO_NAME Exporting SEMAPHORE_GIT_REPO_SLUG Exporting SEMAPHORE_GIT_SHA Exporting SEMAPHORE_GIT_URL Exporting SEMAPHORE_GIT_WORKING_BRANCH Exporting SEMAPHORE_JOB_CREATION_TIME Exporting SEMAPHORE_JOB_ID Exporting SEMAPHORE_JOB_NAME Exporting SEMAPHORE_ORGANIZATION_URL Exporting SEMAPHORE_PIPELINE_0_ARTEFACT_ID Exporting SEMAPHORE_PIPELINE_ARTEFACT_ID Exporting SEMAPHORE_PIPELINE_ID Exporting SEMAPHORE_PIPELINE_PROMOTED_BY Exporting SEMAPHORE_PIPELINE_PROMOTION Exporting SEMAPHORE_PIPELINE_RERUN Exporting SEMAPHORE_PROJECT_ID Exporting SEMAPHORE_PROJECT_NAME Exporting SEMAPHORE_TOOLBOX_METRICS_ENABLED Exporting SEMAPHORE_WORKFLOW_HOOK_SOURCE Exporting SEMAPHORE_WORKFLOW_ID Exporting SEMAPHORE_WORKFLOW_NUMBER Exporting SEMAPHORE_WORKFLOW_RERUN Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_API Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_HOOK Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_MANUAL_RUN Exporting SEMAPHORE_WORKFLOW_TRIGGERED_BY_SCHEDULE Exporting SSH_PRIVATE_KEY_PATH Exporting TERM Injecting Files Injecting /home/semaphore/.ssh/semaphore_cache_key with file mode 0600 Injecting /home/semaphore/.ssh/id_rsa with file mode 0600 Running the pre-job hook configured in the agent Running: source /opt/semaphoreci/prejob/pre_job.sh Warning: The agent is configured to fail the job if the pre-job hook fails. Installing toolbox in pre-job-hook Toolbox download URL: http://packages.semaphoreci.com/toolbox/releases/download/v1.21.8/linux.tar Tar file: linux.tar Attempt 5 toolbox/ toolbox/sem-service toolbox/install-package toolbox/toolbox toolbox/libcheckout toolbox/test-results toolbox/artifact toolbox/install-toolbox toolbox/spc toolbox/cache toolbox/sem-service-check-params toolbox/sem-semantic-release toolbox/sem-version toolbox/ssh-session-cli toolbox/sem-install toolbox/libchecksum toolbox/retry toolbox/sem-context toolbox/Dockerfile.dev toolbox/sem-dockerize toolbox/when toolbox/enetwork toolbox/system-metrics-collector toolbox/README.md retry installed ssh-session-cli installed cache installed sem-context installed sem-service installed sem-dockerize installed sem-service-check-params installed sem-semantic-release installed Installing the artifacts CLI artifacts installed Installing the test results CLI test-results installed Installing the install-package for linux install-package installed Installing the SPC CLI spc installed Installing the when CLI when installed Installing the enetwork CLI enetwork installed Starting to collect System Metrics in /tmp/system-metrics Starting virtual X frame buffer: Xvfb. Toolbox installed Starting ssh-agent Agent pid 3733 ssh-agent started Connecting to cache # 116.202.32.43:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7 # 116.202.32.43:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7 # 116.202.32.43:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7 # 116.202.32.43:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7 # 116.202.32.43:29920 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7 Identity added: /home/semaphore/.ssh/semaphore_cache_key (/home/semaphore/.ssh/semaphore_cache_key) checkout Cloning into 'workos-node'... Warning: Permanently added 'github.com' (ED25519) to the list of known hosts. remote: Enumerating objects: 711, done. remote: Counting objects: 0% (1/711) remote: Counting objects: 1% (8/711) remote: Counting objects: 2% (15/711) remote: Counting objects: 3% (22/711) remote: Counting objects: 4% (29/711) remote: Counting objects: 5% (36/711) remote: Counting objects: 6% (43/711) remote: Counting objects: 7% (50/711) remote: Counting objects: 8% (57/711) remote: Counting objects: 9% (64/711) remote: Counting objects: 10% (72/711) remote: Counting objects: 11% (79/711) remote: Counting objects: 12% (86/711) remote: Counting objects: 13% (93/711) remote: Counting objects: 14% (100/711) remote: Counting objects: 15% (107/711) remote: Counting objects: 16% (114/711) remote: Counting objects: 17% (121/711) remote: Counting objects: 18% (128/711) remote: Counting objects: 19% (136/711) remote: Counting objects: 20% (143/711) remote: Counting objects: 21% (150/711) remote: Counting objects: 22% (157/711) remote: Counting objects: 23% (164/711) remote: Counting objects: 24% (171/711) remote: Counting objects: 25% (178/711) remote: Counting objects: 26% (185/711) remote: Counting objects: 27% (192/711) remote: Counting objects: 28% (200/711) remote: Counting objects: 29% (207/711) remote: Counting objects: 30% (214/711) remote: Counting objects: 31% (221/711) remote: Counting objects: 32% (228/711) remote: Counting objects: 33% (235/711) remote: Counting objects: 34% (242/711) remote: Counting objects: 35% (249/711) remote: Counting objects: 36% (256/711) remote: Counting objects: 37% (264/711) remote: Counting objects: 38% (271/711) remote: Counting objects: 39% (278/711) remote: Counting objects: 40% (285/711) remote: Counting objects: 41% (292/711) remote: Counting objects: 42% (299/711) remote: Counting objects: 43% (306/711) remote: Counting objects: 44% (313/711) remote: Counting objects: 45% (320/711) remote: Counting objects: 46% (328/711) remote: Counting objects: 47% (335/711) remote: Counting objects: 48% (342/711) remote: Counting objects: 49% (349/711) remote: Counting objects: 50% (356/711) remote: Counting objects: 51% (363/711) remote: Counting objects: 52% (370/711) remote: Counting objects: 53% (377/711) remote: Counting objects: 54% (384/711) remote: Counting objects: 55% (392/711) remote: Counting objects: 56% (399/711) remote: Counting objects: 57% (406/711) remote: Counting objects: 58% (413/711) remote: Counting objects: 59% (420/711) remote: Counting objects: 60% (427/711) remote: Counting objects: 61% (434/711) remote: Counting objects: 62% (441/711) remote: Counting objects: 63% (448/711) remote: Counting objects: 64% (456/711) remote: Counting objects: 65% (463/711) remote: Counting objects: 66% (470/711) remote: Counting objects: 67% (477/711) remote: Counting objects: 68% (484/711) remote: Counting objects: 69% (491/711) remote: Counting objects: 70% (498/711) remote: Counting objects: 71% (505/711) remote: Counting objects: 72% (512/711) remote: Counting objects: 73% (520/711) remote: Counting objects: 74% (527/711) remote: Counting objects: 75% (534/711) remote: Counting objects: 76% (541/711) remote: Counting objects: 77% (548/711) remote: Counting objects: 78% (555/711) remote: Counting objects: 79% (562/711) remote: Counting objects: 80% (569/711) remote: Counting objects: 81% (576/711) remote: Counting objects: 82% (584/711) remote: Counting objects: 83% (591/711) remote: Counting objects: 84% (598/711) remote: Counting objects: 85% (605/711) remote: Counting objects: 86% (612/711) remote: Counting objects: 87% (619/711) remote: Counting objects: 88% (626/711) remote: Counting objects: 89% (633/711) remote: Counting objects: 90% (640/711) remote: Counting objects: 91% (648/711) remote: Counting objects: 92% (655/711) remote: Counting objects: 93% (662/711) remote: Counting objects: 94% (669/711) remote: Counting objects: 95% (676/711) remote: Counting objects: 96% (683/711) remote: Counting objects: 97% (690/711) remote: Counting objects: 98% (697/711) remote: Counting objects: 99% (704/711) remote: Counting objects: 100% (711/711) remote: Counting objects: 100% (711/711), done. remote: Compressing objects: 0% (1/460) remote: Compressing objects: 1% (5/460) remote: Compressing objects: 2% (10/460) remote: Compressing objects: 3% (14/460) remote: Compressing objects: 4% (19/460) remote: Compressing objects: 5% (23/460) remote: Compressing objects: 6% (28/460) remote: Compressing objects: 7% (33/460) remote: Compressing objects: 8% (37/460) remote: Compressing objects: 9% (42/460) remote: Compressing objects: 10% (46/460) remote: Compressing objects: 11% (51/460) remote: Compressing objects: 12% (56/460) remote: Compressing objects: 13% (60/460) remote: Compressing objects: 14% (65/460) remote: Compressing objects: 15% (69/460) remote: Compressing objects: 16% (74/460) remote: Compressing objects: 17% (79/460) remote: Compressing objects: 18% (83/460) remote: Compressing objects: 19% (88/460) remote: Compressing objects: 20% (92/460) remote: Compressing objects: 21% (97/460) remote: Compressing objects: 22% (102/460) remote: Compressing objects: 23% (106/460) remote: Compressing objects: 24% (111/460) remote: Compressing objects: 25% (115/460) remote: Compressing objects: 26% (120/460) remote: Compressing objects: 27% (125/460) remote: Compressing objects: 28% (129/460) remote: Compressing objects: 29% (134/460) remote: Compressing objects: 30% (138/460) remote: Compressing objects: 31% (143/460) remote: Compressing objects: 32% (148/460) remote: Compressing objects: 33% (152/460) remote: Compressing objects: 34% (157/460) remote: Compressing objects: 35% (161/460) remote: Compressing objects: 36% (166/460) remote: Compressing objects: 37% (171/460) remote: Compressing objects: 38% (175/460) remote: Compressing objects: 39% (180/460) remote: Compressing objects: 40% (184/460) remote: Compressing objects: 41% (189/460) remote: Compressing objects: 42% (194/460) remote: Compressing objects: 43% (198/460) remote: Compressing objects: 44% (203/460) remote: Compressing objects: 45% (207/460) remote: Compressing objects: 46% (212/460) remote: Compressing objects: 47% (217/460) remote: Compressing objects: 48% (221/460) remote: Compressing objects: 49% (226/460) remote: Compressing objects: 50% (230/460) remote: Compressing objects: 51% (235/460) remote: Compressing objects: 52% (240/460) remote: Compressing objects: 53% (244/460) remote: Compressing objects: 54% (249/460) remote: Compressing objects: 55% (253/460) remote: Compressing objects: 56% (258/460) remote: Compressing objects: 57% (263/460) remote: Compressing objects: 58% (267/460) remote: Compressing objects: 59% (272/460) remote: Compressing objects: 60% (276/460) remote: Compressing objects: 61% (281/460) remote: Compressing objects: 62% (286/460) remote: Compressing objects: 63% (290/460) remote: Compressing objects: 64% (295/460) remote: Compressing objects: 65% (299/460) remote: Compressing objects: 66% (304/460) remote: Compressing objects: 67% (309/460) remote: Compressing objects: 68% (313/460) remote: Compressing objects: 69% (318/460) remote: Compressing objects: 70% (322/460) remote: Compressing objects: 71% (327/460) remote: Compressing objects: 72% (332/460) remote: Compressing objects: 73% (336/460) remote: Compressing objects: 74% (341/460) remote: Compressing objects: 75% (345/460) remote: Compressing objects: 76% (350/460) remote: Compressing objects: 77% (355/460) remote: Compressing objects: 78% (359/460) remote: Compressing objects: 79% (364/460) remote: Compressing objects: 80% (368/460) remote: Compressing objects: 81% (373/460) remote: Compressing objects: 82% (378/460) remote: Compressing objects: 83% (382/460) remote: Compressing objects: 84% (387/460) remote: Compressing objects: 85% (391/460) remote: Compressing objects: 86% (396/460) remote: Compressing objects: 87% (401/460) remote: Compressing objects: 88% (405/460) remote: Compressing objects: 89% (410/460) remote: Compressing objects: 90% (414/460) remote: Compressing objects: 91% (419/460) remote: Compressing objects: 92% (424/460) remote: Compressing objects: 93% (428/460) remote: Compressing objects: 94% (433/460) remote: Compressing objects: 95% (437/460) remote: Compressing objects: 96% (442/460) remote: Compressing objects: 97% (447/460) remote: Compressing objects: 98% (451/460) remote: Compressing objects: 99% (456/460) remote: Compressing objects: 100% (460/460) remote: Compressing objects: 100% (460/460), done. Receiving objects: 0% (1/711) Receiving objects: 1% (8/711) Receiving objects: 2% (15/711) Receiving objects: 3% (22/711) Receiving objects: 4% (29/711) Receiving objects: 5% (36/711) Receiving objects: 6% (43/711) Receiving objects: 7% (50/711) Receiving objects: 8% (57/711) Receiving objects: 9% (64/711) Receiving objects: 10% (72/711) Receiving objects: 11% (79/711) Receiving objects: 12% (86/711) Receiving objects: 13% (93/711) Receiving objects: 14% (100/711) Receiving objects: 15% (107/711) Receiving objects: 16% (114/711) Receiving objects: 17% (121/711) Receiving objects: 18% (128/711) Receiving objects: 19% (136/711) Receiving objects: 20% (143/711) Receiving objects: 21% (150/711) Receiving objects: 22% (157/711) Receiving objects: 23% (164/711) Receiving objects: 24% (171/711) Receiving objects: 25% (178/711) Receiving objects: 26% (185/711) Receiving objects: 27% (192/711) Receiving objects: 28% (200/711) Receiving objects: 29% (207/711) Receiving objects: 30% (214/711) Receiving objects: 31% (221/711) Receiving objects: 32% (228/711) Receiving objects: 33% (235/711) Receiving objects: 34% (242/711) Receiving objects: 35% (249/711) Receiving objects: 36% (256/711) Receiving objects: 37% (264/711) Receiving objects: 38% (271/711) Receiving objects: 39% (278/711) Receiving objects: 40% (285/711) Receiving objects: 41% (292/711) Receiving objects: 42% (299/711) Receiving objects: 43% (306/711) Receiving objects: 44% (313/711) Receiving objects: 45% (320/711) Receiving objects: 46% (328/711) Receiving objects: 47% (335/711) Receiving objects: 48% (342/711) Receiving objects: 49% (349/711) Receiving objects: 50% (356/711) Receiving objects: 51% (363/711) Receiving objects: 52% (370/711) Receiving objects: 53% (377/711) Receiving objects: 54% (384/711) Receiving objects: 55% (392/711) Receiving objects: 56% (399/711) Receiving objects: 57% (406/711) Receiving objects: 58% (413/711) Receiving objects: 59% (420/711) Receiving objects: 60% (427/711) Receiving objects: 61% (434/711) Receiving objects: 62% (441/711) Receiving objects: 63% (448/711) Receiving objects: 64% (456/711) Receiving objects: 65% (463/711) Receiving objects: 66% (470/711) Receiving objects: 67% (477/711) Receiving objects: 68% (484/711) Receiving objects: 69% (491/711) Receiving objects: 70% (498/711) Receiving objects: 71% (505/711) Receiving objects: 72% (512/711) Receiving objects: 73% (520/711) Receiving objects: 74% (527/711) Receiving objects: 75% (534/711) Receiving objects: 76% (541/711) Receiving objects: 77% (548/711) Receiving objects: 78% (555/711) Receiving objects: 79% (562/711) Receiving objects: 80% (569/711) Receiving objects: 81% (576/711) Receiving objects: 82% (584/711) Receiving objects: 83% (591/711) Receiving objects: 84% (598/711) Receiving objects: 85% (605/711) remote: Total 711 (delta 368), reused 464 (delta 220), pack-reused 0 Receiving objects: 86% (612/711) Receiving objects: 87% (619/711) Receiving objects: 88% (626/711) Receiving objects: 89% (633/711) Receiving objects: 90% (640/711) Receiving objects: 91% (648/711) Receiving objects: 92% (655/711) Receiving objects: 93% (662/711) Receiving objects: 94% (669/711) Receiving objects: 95% (676/711) Receiving objects: 96% (683/711) Receiving objects: 97% (690/711) Receiving objects: 98% (697/711) Receiving objects: 99% (704/711) Receiving objects: 100% (711/711) Receiving objects: 100% (711/711), 202.47 KiB | 1.08 MiB/s, done. Resolving deltas: 0% (0/368) Resolving deltas: 1% (4/368) Resolving deltas: 2% (8/368) Resolving deltas: 3% (12/368) Resolving deltas: 4% (15/368) Resolving deltas: 5% (19/368) Resolving deltas: 6% (23/368) Resolving deltas: 7% (26/368) Resolving deltas: 8% (30/368) Resolving deltas: 9% (34/368) Resolving deltas: 10% (37/368) Resolving deltas: 11% (41/368) Resolving deltas: 12% (45/368) Resolving deltas: 13% (48/368) Resolving deltas: 14% (53/368) Resolving deltas: 15% (56/368) Resolving deltas: 16% (60/368) Resolving deltas: 17% (63/368) Resolving deltas: 18% (67/368) Resolving deltas: 19% (70/368) Resolving deltas: 20% (74/368) Resolving deltas: 21% (78/368) Resolving deltas: 22% (81/368) Resolving deltas: 23% (85/368) Resolving deltas: 24% (89/368) Resolving deltas: 25% (92/368) Resolving deltas: 26% (96/368) Resolving deltas: 27% (100/368) Resolving deltas: 28% (104/368) Resolving deltas: 29% (107/368) Resolving deltas: 30% (111/368) Resolving deltas: 31% (115/368) Resolving deltas: 32% (118/368) Resolving deltas: 33% (122/368) Resolving deltas: 34% (126/368) Resolving deltas: 35% (129/368) Resolving deltas: 36% (133/368) Resolving deltas: 37% (137/368) Resolving deltas: 38% (140/368) Resolving deltas: 39% (144/368) Resolving deltas: 40% (148/368) Resolving deltas: 41% (151/368) Resolving deltas: 42% (155/368) Resolving deltas: 43% (159/368) Resolving deltas: 44% (162/368) Resolving deltas: 45% (166/368) Resolving deltas: 46% (170/368) Resolving deltas: 47% (173/368) Resolving deltas: 48% (177/368) Resolving deltas: 49% (181/368) Resolving deltas: 50% (184/368) Resolving deltas: 51% (188/368) Resolving deltas: 52% (192/368) Resolving deltas: 53% (196/368) Resolving deltas: 54% (199/368) Resolving deltas: 55% (203/368) Resolving deltas: 56% (207/368) Resolving deltas: 57% (210/368) Resolving deltas: 58% (214/368) Resolving deltas: 59% (218/368) Resolving deltas: 60% (221/368) Resolving deltas: 61% (225/368) Resolving deltas: 62% (229/368) Resolving deltas: 63% (232/368) Resolving deltas: 64% (236/368) Resolving deltas: 65% (240/368) Resolving deltas: 66% (243/368) Resolving deltas: 67% (247/368) Resolving deltas: 68% (251/368) Resolving deltas: 69% (254/368) Resolving deltas: 70% (258/368) Resolving deltas: 71% (262/368) Resolving deltas: 72% (265/368) Resolving deltas: 73% (269/368) Resolving deltas: 74% (273/368) Resolving deltas: 75% (276/368) Resolving deltas: 76% (280/368) Resolving deltas: 77% (284/368) Resolving deltas: 78% (288/368) Resolving deltas: 79% (291/368) Resolving deltas: 80% (295/368) Resolving deltas: 81% (299/368) Resolving deltas: 82% (302/368) Resolving deltas: 83% (306/368) Resolving deltas: 84% (311/368) Resolving deltas: 85% (313/368) Resolving deltas: 86% (317/368) Resolving deltas: 87% (321/368) Resolving deltas: 88% (324/368) Resolving deltas: 89% (328/368) Resolving deltas: 90% (332/368) Resolving deltas: 91% (335/368) Resolving deltas: 92% (339/368) Resolving deltas: 93% (343/368) Resolving deltas: 94% (346/368) Resolving deltas: 95% (350/368) Resolving deltas: 96% (354/368) Resolving deltas: 97% (357/368) Resolving deltas: 98% (361/368) Resolving deltas: 99% (365/368) Resolving deltas: 100% (368/368) Resolving deltas: 100% (368/368), done. HEAD is now at 276dac8299ed41998627a72d9802eb099b6002e7 nvm install Found '/home/semaphore/workos-node/.nvmrc' with version <14.21.3> Downloading and installing node v14.21.3... Downloading https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz... 0.8% ############################# 41.3% ######################################## 56.0% ########################################################## 81.7% ######################################################################## 100.0% Computing checksum with sha256sum Checksums matched! Now using node v14.21.3 (npm v6.14.18) nvm use Found '/home/semaphore/workos-node/.nvmrc' with version <14.21.3> Now using node v14.21.3 (npm v6.14.18) bash ~/workos-node/bin/restore-or-install HIT: 'node-modules-a80bf997c2b9dcd206fb69dc9ca315ec', using key 'node-modules-a80bf997c2b9dcd206fb69dc9ca315ec'. Downloading key 'node-modules-a80bf997c2b9dcd206fb69dc9ca315ec'... Download complete. Duration: 364.579095ms. Size: 19.7M bytes. Unpacking '/tmp/node-modules-a80bf997c2b9dcd206fb69dc9ca315ec-1726927960'... Unpack complete. Duration: 774.201243ms. Restored: ./node_modules/. yarn test yarn run v1.22.19 $ jest PASS src/user-management/user-management.spec.ts UserManagement getUser ✓ sends a Get User request (7 ms) listUsers ✓ lists users (2 ms) ✓ sends the correct params when filtering (1 ms) createUser ✓ sends a Create User request (1 ms) authenticateUserWithMagicAuth ✓ sends a magic auth authentication request (1 ms) authenticateUserWithPassword ✓ sends an password authentication request (1 ms) authenticateUserWithCode ✓ sends a token authentication request (1 ms) when the code is for an impersonator ✓ deserializes the impersonator metadata authenticateWithRefreshToken ✓ sends a refresh_token authentication request authenticateUserWithTotp ✓ sends a token authentication request (1 ms) authenticateUserWithEmailVerification ✓ sends an email verification authentication request (1 ms) authenticateWithOrganizationSelection ✓ sends an Organization Selection Authentication request (1 ms) sendVerificationEmail ✓ sends a Create Email Verification Challenge request (1 ms) verifyEmail ✓ sends a Complete Email Verification request (1 ms) sendMagicAuthCode ✓ sends a Send Magic Auth Code request (1 ms) sendPasswordResetEmail ✓ sends a Send Password Reset Email request (1 ms) resetPassword ✓ sends a Reset Password request (1 ms) updateUser ✓ sends a updateUser request (1 ms) when only one property is provided ✓ sends a updateUser request (1 ms) enrollAuthFactor ✓ sends an enrollAuthFactor request (1 ms) listAuthFactors ✓ sends a listAuthFactors request (1 ms) deleteUser ✓ sends a deleteUser request getOrganizationMembership ✓ sends a Get OrganizationMembership request (1 ms) listOrganizationMemberships ✓ lists organization memberships (1 ms) ✓ sends the correct params when filtering createOrganizationMembership ✓ sends a create organization membership request updateOrganizationMembership ✓ sends an update organization membership request (1 ms) deleteOrganizationMembership ✓ sends a deleteOrganizationMembership request (28 ms) getInvitation ✓ sends a Get Invitation request (1 ms) listInvitations ✓ lists invitations (1 ms) ✓ sends the correct params when filtering sendInvitation ✓ sends a Send Invitation request (3 ms) ✓ sends the correct params when provided revokeInvitation ✓ send a Revoke Invitation request revokeSession ✓ sends a Revoke Session request (1 ms) getAuthorizationUrl with no custom api hostname ✓ generates an authorize url with the default api hostname (2 ms) with no domain or provider ✓ throws an error for incomplete arguments (1 ms) with a provider ✓ generates an authorize url with the provider with a connectionId ✓ generates an authorize url with the connection (1 ms) with an organizationId ✓ generates an authorization URL with the organization with a custom api hostname ✓ generates an authorize url with the custom api hostname (1 ms) with state ✓ generates an authorize url with the provided state with domainHint ✓ generates an authorize url with the provided domain hint (1 ms) with loginHint ✓ generates an authorize url with the provided login hint getLogoutUrl ✓ returns a logout url getJwksUrl ✓ returns the jwks url ✓ throws an error if the clientId is blank (33 ms) PASS src/mfa/mfa.spec.ts MFA getFactor ✓ returns the requested factor (1 ms) deleteFactor ✓ sends request to delete a Factor enrollFactor with generic ✓ enrolls a factor with generic type (1 ms) with totp ✓ enrolls a factor with totp type (1 ms) with sms ✓ enrolls a factor with sms type when phone number is invalid ✓ throws an exception (9 ms) challengeFactor with no sms template ✓ challenge a factor with no sms template (1 ms) with sms template ✓ challenge a factor with sms template verifyChallenge verify with successful response ✓ verifies a successful factor (1 ms) when the challenge has been previously verified ✓ throws an exception (1 ms) when the challenge has expired ✓ throws an exception (1 ms) ✓ exception has code PASS src/directory-sync/directory-sync.spec.ts DirectorySync listDirectories with options ✓ requests Directories with query parameters (1 ms) getDirectory ✓ requests a Directory (1 ms) deleteDirectory ✓ sends a request to delete the directory (1 ms) getGroup ✓ requests a Directory Group (1 ms) listGroups with a Directory ✓ requests a Directory's Groups (1 ms) with a User ✓ requests a Directory's Groups (1 ms) listUsers with a Directory ✓ requests a Directory's Users (1 ms) with custom attributes ✓ returns the custom attributes, using the provided type (1 ms) with a Group ✓ requests a Directory's Users (1 ms) getUser ✓ requests a Directory User (1 ms) (node:4480) WorkOS: The `domain` parameter for `getAuthorizationURL` is deprecated. Please use `organization` instead. (Use `node --trace-warnings ...` to show where the warning was created) (node:4480) WorkOS: The `domain` parameter for `getAuthorizationURL` is deprecated. Please use `organization` instead. (node:4480) WorkOS: The `domain` parameter for `getAuthorizationURL` is deprecated. Please use `organization` instead. PASS src/sso/sso.spec.ts SSO SSO with options ✓ requests Connections with query parameters (2 ms) getAuthorizationUrl with no custom api hostname ✓ generates an authorize url with the default api hostname with no domain or provider ✓ throws an error for incomplete arguments with a provider ✓ generates an authorize url with the provider with a connection ✓ generates an authorize url with the connection (1 ms) with an `organization` ✓ generates an authorization URL with the organization with a custom api hostname ✓ generates an authorize url with the custom api hostname (1 ms) with state ✓ generates an authorize url with the provided state with domainHint ✓ generates an authorize url with the provided domain hint with loginHint ✓ generates an authorize url with the provided login hint (1 ms) getProfileAndToken with all information provided ✓ sends a request to the WorkOS api for a profile (2 ms) without a groups attribute ✓ sends a request to the WorkOS api for a profile (1 ms) getProfile ✓ calls the `/sso/profile` endpoint with the provided access token deleteConnection ✓ sends request to delete a Connection getConnection ✓ requests a Connection (1 ms) listConnections ✓ requests a list of Connections (5 ms) PASS src/audit-logs/audit-logs.spec.ts AuditLogs createEvent with an idempotency key ✓ includes an idempotency key with request (2 ms) when the api responds with a 200 ✓ returns void (1 ms) when the api responds with a 401 ✓ throws an UnauthorizedException (13 ms) when the api responds with a 400 ✓ throws an BadRequestException (1 ms) createExport when the api responds with a 201 ✓ returns `audit_log_export` when additional filters are defined ✓ returns `audit_log_export` when the api responds with a 401 ✓ throws an UnauthorizedException (1 ms) getExport when the api responds with a 201 ✓ returns `audit_log_export` (1 ms) when the api responds with a 401 ✓ throws an UnauthorizedException (1 ms) PASS src/organizations/organizations.spec.ts Organizations listOrganizations without any options ✓ returns organizations and metadata (13 ms) with the domain option ✓ forms the proper request to the API (1 ms) with the before option ✓ forms the proper request to the API (1 ms) with the after option ✓ forms the proper request to the API (1 ms) with the limit option ✓ forms the proper request to the API (1 ms) createOrganization with an idempotency key ✓ includes an idempotency key with request with a valid payload ✓ creates an organization with an invalid payload ✓ returns an error (8 ms) getOrganization ✓ requests an Organization (1 ms) deleteOrganization ✓ sends request to delete an Organization updateOrganization with a valid payload ✓ updates an organization PASS src/webhooks/webhooks.spec.ts Webhooks constructEvent with the correct payload, sig_header, and secret ✓ returns a webhook event (5 ms) with the correct payload, sig_header, secret, and tolerance ✓ returns a webhook event (2 ms) with an empty header ✓ raises an error (15 ms) with an empty signature hash ✓ raises an error (2 ms) with an incorrect signature hash ✓ raises an error (1 ms) with an incorrect payload ✓ raises an error (1 ms) with an incorrect webhook secret ✓ raises an error (1 ms) with a timestamp outside tolerance ✓ raises an error (1 ms) verifyHeader ✓ returns true when the signature is valid getTimestampAndSignatureHash ✓ returns the timestamp and signature when the signature is valid (1 ms) computeSignature ✓ returns the computed signature PASS src/workos.spec.ts WorkOS constructor when no API key is provided ✓ throws a NoApiKeyFoundException error (12 ms) when API key is provided with environment variable ✓ initializes (1 ms) when API key is provided with constructor ✓ initializes (1 ms) with https option ✓ sets baseURL with apiHostname option ✓ sets baseURL (1 ms) with port option ✓ sets baseURL (1 ms) when the `config` option is provided ✓ applies the configuration to the fetch client (1 ms) version ✓ matches the version in `package.json` (3 ms) post when the api responds with a 404 ✓ throws a NotFoundException (1 ms) ✓ preserves the error code, status, and message from the underlying response (1 ms) ✓ includes the path in the message if there is no message in the response (1 ms) when the api responds with a 500 and no error/error_description ✓ throws an GenericServerException (1 ms) when the api responds with a 400 and an error/error_description ✓ throws an OauthException (1 ms) when the entity is null ✓ sends a null body (1 ms) PASS src/portal/portal.spec.ts Portal generateLink with a valid organization with the sso intent ✓ returns an Admin Portal link (2 ms) with the domain_verification intent ✓ returns an Admin Portal link (6 ms) with the dsync intent ✓ returns an Admin Portal link with the `audit_logs` intent ✓ returns an Admin Portal link (1 ms) with the `log_streams` intent ✓ returns an Admin Portal link (1 ms) with an invalid organization ✓ throws an error (9 ms) PASS src/organization-domains/organization-domains.spec.ts OrganizationDomains get ✓ requests an Organization Domain (1 ms) ✓ requests an Organization Domain (1 ms) verify ✓ start Organization Domain verification flow (1 ms) create ✓ creates an Organization Domain (1 ms) PASS src/events/events.spec.ts Event listEvents ✓ requests Events ✓ requests Events with a valid event name (1 ms) with options ✓ requests Events with query parameters (2 ms) PASS src/passwordless/passwordless.spec.ts Passwordless createSession with valid options ✓ creates a passwordless session (2 ms) sendEmail with a valid session id ✓ sends a request to send a magic link email PASS src/directory-sync/utils/get-primary-email.spec.ts getPrimaryEmail ✓ returns primary email value Test Suites: 13 passed, 13 total Tests: 146 passed, 146 total Snapshots: 24 passed, 24 total Time: 6.264 s Ran all test suites. Done in 6.75s. Exporting environment variables Exporting SEMAPHORE_JOB_RESULT