fix: add tests for enums

This commit is contained in:
StevanFreeborn
2023-01-26 23:47:25 -06:00
parent fcc47993cd
commit c5de0131e0
20 changed files with 400 additions and 10 deletions
+18
View File
@@ -0,0 +1,18 @@
import { DataFormat } from '../src/enums/DataFormat';
import { expect } from 'chai';
describe('DataFormat', function () {
describe('Raw', function () {
it('should return the correct value', function () {
const result = DataFormat.Raw;
expect(result).to.equal('Raw');
});
});
describe('Formatted', function () {
it('should return the correct value', function () {
const result = DataFormat.Formatted;
expect(result).to.equal('Formatted');
});
});
});
+25
View File
@@ -0,0 +1,25 @@
import { FieldStatus } from '../src/enums/FieldStatus';
import { expect } from 'chai';
describe('FieldStatus', function () {
describe('Enabled', function () {
it('should return the correct value', function () {
const result = FieldStatus.Enabled;
expect(result).to.equal('Enabled');
});
});
describe('Disabled', function () {
it('should return the correct value', function () {
const result = FieldStatus.Disabled;
expect(result).to.equal('Disabled');
});
});
describe('Invalid', function () {
it('should return the correct value', function () {
const result = FieldStatus.Invalid;
expect(result).to.equal('Invalid');
});
});
});
+88
View File
@@ -0,0 +1,88 @@
import { FieldType } from '../src/enums/FieldType';
import { expect } from 'chai';
describe('FieldType', function () {
describe('Text', function () {
it('should return the correct value', function () {
const result = FieldType.Text;
expect(result).to.equal('Text');
});
});
describe('Number', function () {
it('should return the correct value', function () {
const result = FieldType.Number;
expect(result).to.equal('Number');
});
});
describe('AutoNumber', function () {
it('should return the correct value', function () {
const result = FieldType.AutoNumber;
expect(result).to.equal('AutoNumber');
});
});
describe('Date', function () {
it('should return the correct value', function () {
const result = FieldType.Date;
expect(result).to.equal('Date');
});
});
describe('TimeSpan', function () {
it('should return the correct value', function () {
const result = FieldType.TimeSpan;
expect(result).to.equal('TimeSpan');
});
});
describe('List', function () {
it('should return the correct value', function () {
const result = FieldType.List;
expect(result).to.equal('List');
});
});
describe('Reference', function () {
it('should return the correct value', function () {
const result = FieldType.Reference;
expect(result).to.equal('Reference');
});
});
describe('SurveyReference', function () {
it('should return the correct value', function () {
const result = FieldType.SurveyReference;
expect(result).to.equal('SurveyReference');
});
});
describe('SurveyGroupScoring', function () {
it('should return the correct value', function () {
const result = FieldType.SurveyGroupScoring;
expect(result).to.equal('SurveyGroupScoring');
});
});
describe('SurveyCampaign', function () {
it('should return the correct value', function () {
const result = FieldType.SurveyCampaign;
expect(result).to.equal('SurveyCampaign');
});
});
describe('SurveyUnifiedAnswer', function () {
it('should return the correct value', function () {
const result = FieldType.SurveyUnifiedAnswer;
expect(result).to.equal('SurveyUnifiedAnswer');
});
});
describe('Attachment', function () {
it('should return the correct value', function () {
const result = FieldType.Attachment;
expect(result).to.equal('Attachment');
});
});
});
+25
View File
@@ -0,0 +1,25 @@
import { FileStorageSite } from '../src/enums/FileStorageSite';
import { expect } from 'chai';
describe('FileStorageSite', function () {
describe('GoogleDrive', function () {
it('should return the correct value', function () {
const result = FileStorageSite.GoogleDrive;
expect(result).to.equal('GoogleDrive');
});
});
describe('OneDrive', function () {
it('should return the correct value', function () {
const result = FileStorageSite.OneDrive;
expect(result).to.equal('OneDrive');
});
});
describe('Internal', function () {
it('should return the correct value', function () {
const result = FileStorageSite.Internal;
expect(result).to.equal('Internal');
});
});
});
+32
View File
@@ -0,0 +1,32 @@
import { FormulaOutputType } from '../src/enums/FormulaOutputType';
import { expect } from 'chai';
describe('FormulaOutputType', function () {
describe('Text', function () {
it('should return the correct value', function () {
const result = FormulaOutputType.Text;
expect(result).to.equal('Text');
});
});
describe('Numeric', function () {
it('should return the correct value', function () {
const result = FormulaOutputType.Numeric;
expect(result).to.equal('Numeric');
});
});
describe('DateAndTime', function () {
it('should return the correct value', function () {
const result = FormulaOutputType.DateAndTime;
expect(result).to.equal('DateAndTime');
});
});
describe('ListValue', function () {
it('should return the correct value', function () {
const result = FormulaOutputType.ListValue;
expect(result).to.equal('ListValue');
});
});
});
+18
View File
@@ -0,0 +1,18 @@
import { Multiplicity } from '../src/enums/Multiplicity';
import { expect } from 'chai';
describe('Multiplicity', function () {
describe('SingleSelect', function () {
it('should return the correct value', function () {
const result = Multiplicity.SingleSelect;
expect(result).to.equal('SingleSelect');
});
});
describe('MultiSelect', function () {
it('should return the correct value', function () {
const result = Multiplicity.MultiSelect;
expect(result).to.equal('MultiSelect');
});
});
});
+18
View File
@@ -0,0 +1,18 @@
import { ReportDataType } from '../src/enums/ReportDataType';
import { expect } from 'chai';
describe('ReportDataType', function () {
describe('ReportData', function () {
it('should return the correct value', function () {
const result = ReportDataType.ReportData;
expect(result).to.equal('ReportData');
});
});
describe('ChartData', function () {
it('should return the correct value', function () {
const result = ReportDataType.ChartData;
expect(result).to.equal('ChartData');
});
});
});
+88
View File
@@ -0,0 +1,88 @@
import { ResultValueType } from '../src/enums/ResultValueType';
import { expect } from 'chai';
describe('ResultValueType', function () {
describe('String', function () {
it('should return the correct value', function () {
const result = ResultValueType.String;
expect(result).to.equal('String');
});
});
describe('Integer', function () {
it('should return the correct value', function () {
const result = ResultValueType.Integer;
expect(result).to.equal('Integer');
});
});
describe('Decimal', function () {
it('should return the correct value', function () {
const result = ResultValueType.Decimal;
expect(result).to.equal('Decimal');
});
});
describe('Date', function () {
it('should return the correct value', function () {
const result = ResultValueType.Date;
expect(result).to.equal('Date');
});
});
describe('TimeSpan', function () {
it('should return the correct value', function () {
const result = ResultValueType.TimeSpan;
expect(result).to.equal('TimeSpan');
});
});
describe('Guid', function () {
it('should return the correct value', function () {
const result = ResultValueType.Guid;
expect(result).to.equal('Guid');
});
});
describe('StringList', function () {
it('should return the correct value', function () {
const result = ResultValueType.StringList;
expect(result).to.equal('StringList');
});
});
describe('IntegerList', function () {
it('should return the correct value', function () {
const result = ResultValueType.IntegerList;
expect(result).to.equal('IntegerList');
});
});
describe('GuidList', function () {
it('should return the correct value', function () {
const result = ResultValueType.GuidList;
expect(result).to.equal('GuidList');
});
});
describe('AttachmentList', function () {
it('should return the correct value', function () {
const result = ResultValueType.AttachmentList;
expect(result).to.equal('AttachmentList');
});
});
describe('ScoringGroupList', function () {
it('should return the correct value', function () {
const result = ResultValueType.ScoringGroupList;
expect(result).to.equal('ScoringGroupList');
});
});
describe('FileList', function () {
it('should return the correct value', function () {
const result = ResultValueType.FileList;
expect(result).to.equal('FileList');
});
});
});
+53
View File
@@ -0,0 +1,53 @@
import { TimeSpanIncrement } from '../src/enums/TimeSpanIncrement';
import { expect } from 'chai';
describe('TimeSpanIncrement', function () {
describe('Seconds', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Seconds;
expect(result).to.equal('Seconds');
});
});
describe('Minutes', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Minutes;
expect(result).to.equal('Minutes');
});
});
describe('Hours', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Hours;
expect(result).to.equal('Hours');
});
});
describe('Days', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Days;
expect(result).to.equal('Days');
});
});
describe('Weeks', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Weeks;
expect(result).to.equal('Weeks');
});
});
describe('Months', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Months;
expect(result).to.equal('Months');
});
});
describe('Years', function () {
it('should return the correct value', function () {
const result = TimeSpanIncrement.Years;
expect(result).to.equal('Years');
});
});
});
+25
View File
@@ -0,0 +1,25 @@
import { TimeSpanRecurrenceType } from '../src/enums/TimeSpanRecurrenceType';
import { expect } from 'chai';
describe('TimeSpanRecurrenceType', function () {
describe('None', function () {
it('should return the correct value', function () {
const result = TimeSpanRecurrenceType.None;
expect(result).to.equal('None');
});
});
describe('EndByDate', function () {
it('should return the correct value', function () {
const result = TimeSpanRecurrenceType.EndByDate;
expect(result).to.equal('EndByDate');
});
});
describe('EndAfterOccurrences', function () {
it('should return the correct value', function () {
const result = TimeSpanRecurrenceType.EndAfterOccurrences;
expect(result).to.equal('EndAfterOccurrences');
});
});
});