trade360-nodejs-sdk
Version:
LSports Trade360 SDK for Node.js
56 lines • 2.93 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const gender_enum_1 = require("../../../../../src/api/common/body-entities/responses/gender.enum");
const age_category_enum_1 = require("../../../../../src/api/common/body-entities/responses/age-category.enum");
const participant_type_enum_1 = require("../../../../../src/api/common/body-entities/responses/participant-type.enum");
describe('Gender Enum', () => {
it('should have correct values', () => {
expect(gender_enum_1.Gender.Men).toBe(1);
expect(gender_enum_1.Gender.Women).toBe(2);
expect(gender_enum_1.Gender.Mix).toBe(3);
});
it('should have all expected members', () => {
const genderValues = Object.values(gender_enum_1.Gender).filter((value) => typeof value === 'number');
expect(genderValues).toHaveLength(3);
expect(genderValues).toContain(1);
expect(genderValues).toContain(2);
expect(genderValues).toContain(3);
});
});
describe('AgeCategory Enum', () => {
it('should have correct values', () => {
expect(age_category_enum_1.AgeCategory.Regular).toBe(0);
expect(age_category_enum_1.AgeCategory.Youth).toBe(1);
expect(age_category_enum_1.AgeCategory.Reserves).toBe(2);
});
it('should have all expected members', () => {
const ageCategoryValues = Object.values(age_category_enum_1.AgeCategory).filter((value) => typeof value === 'number');
expect(ageCategoryValues).toHaveLength(3);
expect(ageCategoryValues).toContain(0);
expect(ageCategoryValues).toContain(1);
expect(ageCategoryValues).toContain(2);
});
});
describe('ParticipantType Enum', () => {
it('should have correct values', () => {
expect(participant_type_enum_1.ParticipantType.Club).toBe(1);
expect(participant_type_enum_1.ParticipantType.National).toBe(2);
expect(participant_type_enum_1.ParticipantType.Individual).toBe(3);
expect(participant_type_enum_1.ParticipantType.Virtual).toBe(4);
expect(participant_type_enum_1.ParticipantType.Esports).toBe(5);
expect(participant_type_enum_1.ParticipantType.VirtuReal).toBe(6);
expect(participant_type_enum_1.ParticipantType.Doubles).toBe(7);
});
it('should have all expected members', () => {
const participantTypeValues = Object.values(participant_type_enum_1.ParticipantType).filter((value) => typeof value === 'number');
expect(participantTypeValues).toHaveLength(7);
expect(participantTypeValues).toContain(1);
expect(participantTypeValues).toContain(2);
expect(participantTypeValues).toContain(3);
expect(participantTypeValues).toContain(4);
expect(participantTypeValues).toContain(5);
expect(participantTypeValues).toContain(6);
expect(participantTypeValues).toContain(7);
});
});
//# sourceMappingURL=enums.spec.js.map