Skip to content

Commit

Permalink
chore(test): improve organization user test stability (#5717)
Browse files Browse the repository at this point in the history
  • Loading branch information
charIeszhao authored Apr 16, 2024
1 parent 94b62fb commit 49b60af
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,12 @@ describe('organization user APIs', () => {
// Assign role1 to user
await organizationApi.addUserRoles(organization.id, user.id, [role1.id]);
const scopes = await organizationApi.getUserOrganizationScopes(organization.id, user.id);
expect(scopes.map(({ name }) => name)).toMatchObject([scope1.name, scope2.name]);
expect(
scopes
.map(({ name }) => name)
.slice()
.sort()
).toEqual([scope1.name, scope2.name].slice().sort());

// Remove role1 and assign role2 to user
await organizationApi.deleteUserRole(organization.id, user.id, role1.id);
Expand Down

0 comments on commit 49b60af

Please sign in to comment.