import 'jest'; import { Value } from '@punchcard/shape'; import { AttributeValue } from '../lib'; import { Direction, MyType } from './mock'; it('should map Shape AST to AttributeValue AST', () => { const s: AttributeValue.ShapeOf = null as any; const actual: Value.Of = null as any; // compile-time unit test const expected: { M: { id: AttributeValue.String, count?: AttributeValue.Nothing | AttributeValue.Number, integer: AttributeValue.Number, directon: { S: Direction; }, nested: { M: { a: AttributeValue.String; } }, array: AttributeValue.List; complexArray: AttributeValue.List>; stringSet: AttributeValue.StringSet; numberSet: AttributeValue.NumberSet; map: AttributeValue.Map; complexMap: AttributeValue.Map>; binaryField: AttributeValue.BinarySet; binarySet: AttributeValue.BinarySet; anyField: any; } } = actual; });