"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const space_1 = require("../types/space");
const projectMemberRole_1 = require("./projectMemberRole");
describe('projectMemberRole', () => {
    describe('getHighestSpaceRole', () => {
        it('should get the highest space role', () => {
            const highestRole = (0, projectMemberRole_1.getHighestSpaceRole)([
                space_1.SpaceMemberRole.ADMIN,
                space_1.SpaceMemberRole.EDITOR,
                space_1.SpaceMemberRole.VIEWER,
            ]);
            expect(highestRole).toBe(space_1.SpaceMemberRole.ADMIN);
            const highestRole2 = (0, projectMemberRole_1.getHighestSpaceRole)([
                space_1.SpaceMemberRole.EDITOR,
                space_1.SpaceMemberRole.VIEWER,
            ]);
            expect(highestRole2).toBe(space_1.SpaceMemberRole.EDITOR);
            const highestRole3 = (0, projectMemberRole_1.getHighestSpaceRole)([space_1.SpaceMemberRole.VIEWER]);
            expect(highestRole3).toBe(space_1.SpaceMemberRole.VIEWER);
            const highestRole4 = (0, projectMemberRole_1.getHighestSpaceRole)([
                space_1.SpaceMemberRole.VIEWER,
                undefined,
            ]);
            expect(highestRole4).toBe(space_1.SpaceMemberRole.VIEWER);
            const highestRole5 = (0, projectMemberRole_1.getHighestSpaceRole)([undefined, undefined]);
            expect(highestRole5).toBe(undefined);
            const highestRole6 = (0, projectMemberRole_1.getHighestSpaceRole)([
                undefined,
                space_1.SpaceMemberRole.VIEWER,
                space_1.SpaceMemberRole.EDITOR,
            ]);
            expect(highestRole6).toBe(space_1.SpaceMemberRole.EDITOR);
            // Test goes here
        });
    });
});
//# sourceMappingURL=projectMemberRole.test.js.map