cloudprovider-utils.test.ts 720 B

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