fix: add tests for enums
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
enum DataFormat {
|
||||
export enum DataFormat {
|
||||
Raw = 'Raw',
|
||||
Formatted = 'Formatted',
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
enum FieldStatus {
|
||||
export enum FieldStatus {
|
||||
Enabled = 'Enabled',
|
||||
Disabled = 'Disabled',
|
||||
Invalid = 'Invalid',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum FieldType {
|
||||
export enum FieldType {
|
||||
Text = 'Text',
|
||||
Number = 'Number',
|
||||
AutoNumber = 'AutoNumber',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum FileStorageSite {
|
||||
export enum FileStorageSite {
|
||||
Internal = 'Internal',
|
||||
OneDrive = 'OneDrive',
|
||||
GoogleDrive = 'GoogleDrive',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum FormulaOutputType {
|
||||
export enum FormulaOutputType {
|
||||
Text = 'Text',
|
||||
Numeric = 'Numeric',
|
||||
DateAndTime = 'DateAndTime',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum Multiplicity {
|
||||
export enum Multiplicity {
|
||||
SingleSelect = 'SingleSelect',
|
||||
MultiSelect = 'MultiSelect',
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum ReportDataType {
|
||||
export enum ReportDataType {
|
||||
ReportData = 'ReportData',
|
||||
ChartData = 'ChartData',
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum ResultValueType {
|
||||
export enum ResultValueType {
|
||||
String = 'String',
|
||||
Integer = 'Integer',
|
||||
Decimal = 'Decimal',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum TimeSpanIncrement {
|
||||
export enum TimeSpanIncrement {
|
||||
Seconds = 'Seconds',
|
||||
Minutes = 'Minutes',
|
||||
Hours = 'Hours',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
enum TimeSpanRecurrenceType {
|
||||
export enum TimeSpanRecurrenceType {
|
||||
None = 'None',
|
||||
EndByDate = 'EndByDate',
|
||||
EndAfterOccurrences = 'EndAfterOccurrences',
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user