- Fixed types

This commit is contained in:
Ferdi Koomen 2020-11-15 22:04:31 +01:00
parent b871eab07f
commit ef2542a188
4 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ export enum PrimaryType {
}
export const TYPE_MAPPINGS = new Map<string, PrimaryType>([
['File', PrimaryType.FILE],
['file', PrimaryType.FILE],
['any', PrimaryType.OBJECT],
['object', PrimaryType.OBJECT],

View File

@ -2,6 +2,7 @@ import { getMappedType } from './getMappedType';
describe('getMappedType', () => {
it('should map types to the basics', () => {
expect(getMappedType('File')).toEqual('File');
expect(getMappedType('file')).toEqual('File');
expect(getMappedType('string')).toEqual('string');
expect(getMappedType('date')).toEqual('string');

View File

@ -10,6 +10,7 @@ export enum PrimaryType {
}
export const TYPE_MAPPINGS = new Map<string, PrimaryType>([
['File', PrimaryType.FILE],
['file', PrimaryType.FILE],
['any', PrimaryType.OBJECT],
['object', PrimaryType.OBJECT],

View File

@ -2,6 +2,7 @@ import { getMappedType } from './getMappedType';
describe('getMappedType', () => {
it('should map types to the basics', () => {
expect(getMappedType('File')).toEqual('File');
expect(getMappedType('file')).toEqual('File');
expect(getMappedType('string')).toEqual('string');
expect(getMappedType('date')).toEqual('string');