Nodes.utils.test.ts22 lines · main
| 1 | import { describe, expect, it } from 'vitest' |
| 2 | |
| 3 | import { getReplicationDestinationType } from './Nodes.utils' |
| 4 | |
| 5 | describe('getReplicationDestinationType', () => { |
| 6 | it('returns BigQuery for big_query configs', () => { |
| 7 | expect(getReplicationDestinationType({ big_query: {} })).toBe('BigQuery') |
| 8 | }) |
| 9 | |
| 10 | it('returns Analytics Bucket for iceberg configs', () => { |
| 11 | expect(getReplicationDestinationType({ iceberg: {} })).toBe('Analytics Bucket') |
| 12 | }) |
| 13 | |
| 14 | it('returns DuckLake for ducklake configs', () => { |
| 15 | expect(getReplicationDestinationType({ ducklake: {} })).toBe('DuckLake') |
| 16 | }) |
| 17 | |
| 18 | it('returns undefined for unknown or missing configs', () => { |
| 19 | expect(getReplicationDestinationType({})).toBeUndefined() |
| 20 | expect(getReplicationDestinationType(undefined)).toBeUndefined() |
| 21 | }) |
| 22 | }) |