test: add date mapping tests

This commit is contained in:
Wieland Schöbl
2021-02-01 14:47:50 +01:00
parent 62a739048c
commit 33397e90fe
3 changed files with 58 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ import {filterableTagTest} from './mapping-model/mappings/src/filterable-tag';
import {anyUnknownTest} from './mapping-model/mappings/src/any-unknown';
import {tagsIgnoreCaseTest} from './mapping-model/mappings/src/tags-ignore-case';
import {typeAliasTest} from './mapping-model/mappings/src/type-alias';
import {dateAndRangeTest} from './mapping-model/mappings/src/date';
process.on('unhandledRejection', (error: unknown) => {
if (error instanceof Error) {
@@ -168,4 +169,9 @@ export class MappingSpec {
async 'Invalid tags should cause an error'() {
magAppInstance.testInterfaceAgainstPath(invalidTagTest);
}
@test
async 'Dates and date ranges should have the correct type'() {
magAppInstance.testInterfaceAgainstPath(dateAndRangeTest);
}
}