import { test } from '@japa/runner'
import * as Platform from '../../../src/Platform.js'

test.group('Platform', () => {
  test('hasFormData is false', ({ assert }) => {
    const platformValue = typeof FormData === 'function'
    assert.equal(Platform.hasFormData, platformValue)
  })

  test('hasBlob is false', ({ assert }) => {
    const platformValue = typeof Blob === 'function'
    assert.equal(Platform.hasBlob, platformValue)
  })

  test('hasFile is false', ({ assert }) => {
    const platformValue = typeof File === 'function'
    assert.equal(Platform.hasFile, platformValue)
  })

  test('hasBuffer is true', ({ assert }) => {
    const platformValue = typeof Buffer === 'function'
    assert.equal(Platform.hasBuffer, platformValue)
  })
})
