11import { describe , it , expect } from 'vitest' ;
22import {
33 ExternalDataSourceSchema ,
4- FieldMappingSchema ,
4+ ExternalFieldMappingSchema ,
55 ExternalLookupSchema ,
66 type ExternalLookup ,
77 type ExternalDataSource ,
8- type FieldMapping ,
8+ type ExternalFieldMapping ,
99} from './external-lookup.zod' ;
1010
1111describe ( 'ExternalDataSourceSchema' , ( ) => {
@@ -118,16 +118,16 @@ describe('ExternalDataSourceSchema', () => {
118118 } ) ;
119119} ) ;
120120
121- describe ( 'FieldMappingSchema ' , ( ) => {
121+ describe ( 'ExternalFieldMappingSchema ' , ( ) => {
122122 it ( 'should validate complete field mapping' , ( ) => {
123- const validMapping : FieldMapping = {
123+ const validMapping : ExternalFieldMapping = {
124124 source : 'AccountName' ,
125125 target : 'name' ,
126126 type : 'text' ,
127127 readonly : true ,
128128 } ;
129129
130- expect ( ( ) => FieldMappingSchema . parse ( validMapping ) ) . not . toThrow ( ) ;
130+ expect ( ( ) => ExternalFieldMappingSchema . parse ( validMapping ) ) . not . toThrow ( ) ;
131131 } ) ;
132132
133133 it ( 'should accept minimal field mapping' , ( ) => {
@@ -137,7 +137,7 @@ describe('FieldMappingSchema', () => {
137137 type : 'text' ,
138138 } ;
139139
140- expect ( ( ) => FieldMappingSchema . parse ( minimalMapping ) ) . not . toThrow ( ) ;
140+ expect ( ( ) => ExternalFieldMappingSchema . parse ( minimalMapping ) ) . not . toThrow ( ) ;
141141 } ) ;
142142
143143 it ( 'should default readonly to true' , ( ) => {
@@ -147,7 +147,7 @@ describe('FieldMappingSchema', () => {
147147 type : 'text' ,
148148 } ;
149149
150- const parsed = FieldMappingSchema . parse ( mapping ) ;
150+ const parsed = ExternalFieldMappingSchema . parse ( mapping ) ;
151151 expect ( parsed . readonly ) . toBe ( true ) ;
152152 } ) ;
153153
@@ -159,7 +159,7 @@ describe('FieldMappingSchema', () => {
159159 readonly : false ,
160160 } ;
161161
162- expect ( ( ) => FieldMappingSchema . parse ( writableMapping ) ) . not . toThrow ( ) ;
162+ expect ( ( ) => ExternalFieldMappingSchema . parse ( writableMapping ) ) . not . toThrow ( ) ;
163163 } ) ;
164164
165165 it ( 'should accept various field types' , ( ) => {
@@ -172,7 +172,7 @@ describe('FieldMappingSchema', () => {
172172 type,
173173 } ;
174174
175- expect ( ( ) => FieldMappingSchema . parse ( mapping ) ) . not . toThrow ( ) ;
175+ expect ( ( ) => ExternalFieldMappingSchema . parse ( mapping ) ) . not . toThrow ( ) ;
176176 } ) ;
177177 } ) ;
178178} ) ;
0 commit comments