@@ -8,18 +8,13 @@ import {
88 valueForTypeConversion ,
99 wouldExceedColumnTypeLimit ,
1010} from '@/lib/table/column-types'
11- import { coerceValue } from '@/lib/table/import'
1211import type { ColumnDefinition } from '@/lib/table/types'
1312
1413const definition = COLUMN_TYPE_REGISTRY . string
1514const originalMaxPerTable = definition . maxPerTable
16- const originalCoerceImport = definition . coerceImport
1715const originalValueForConversion = definition . valueForConversion
1816
19- function restoreOptionalProperty (
20- key : 'maxPerTable' | 'coerceImport' | 'valueForConversion' ,
21- value : unknown
22- ) {
17+ function restoreOptionalProperty ( key : 'maxPerTable' | 'valueForConversion' , value : unknown ) {
2318 if ( value === undefined ) {
2419 Reflect . deleteProperty ( definition , key )
2520 return
@@ -29,7 +24,6 @@ function restoreOptionalProperty(
2924
3025afterEach ( ( ) => {
3126 restoreOptionalProperty ( 'maxPerTable' , originalMaxPerTable )
32- restoreOptionalProperty ( 'coerceImport' , originalCoerceImport )
3327 restoreOptionalProperty ( 'valueForConversion' , originalValueForConversion )
3428} )
3529
@@ -82,12 +76,4 @@ describe('column type extension points', () => {
8276 )
8377 ) . toBeNull ( )
8478 } )
85-
86- it ( 'lets a type own CSV import coercion' , ( ) => {
87- Object . assign ( definition , {
88- coerceImport : ( value : unknown ) => `imported:${ String ( value ) } ` ,
89- } )
90-
91- expect ( coerceValue ( 'raw' , 'string' ) ) . toBe ( 'imported:raw' )
92- } )
9379} )
0 commit comments