cloudprovider-utils.test.ts24 lines · main
| 1 | import { describe, expect, it } from 'vitest' |
| 2 | |
| 3 | import { getCloudProviderArchitecture } from './cloudprovider-utils' |
| 4 | import { PROVIDERS } from './constants' |
| 5 | |
| 6 | describe('getCloudProviderArchitecture', () => { |
| 7 | it('should return the correct architecture', () => { |
| 8 | const result = getCloudProviderArchitecture(PROVIDERS.AWS.id) |
| 9 | |
| 10 | expect(result).toBe('ARM') |
| 11 | }) |
| 12 | |
| 13 | it('should return the correct architecture for fly', () => { |
| 14 | const result = getCloudProviderArchitecture(PROVIDERS.FLY.id) |
| 15 | |
| 16 | expect(result).toBe('x86 64-bit') |
| 17 | }) |
| 18 | |
| 19 | it('should return an empty string if the cloud provider is not supported', () => { |
| 20 | const result = getCloudProviderArchitecture('unknown') |
| 21 | |
| 22 | expect(result).toBe('') |
| 23 | }) |
| 24 | }) |