fabasoad/translation-action

View on GitHub
src/__tests__/providers/FunTranslationsProvider.spec.ts

Summary

Maintainability
A
0 mins
Test Coverage
import FunTranslationsProvider from '../../providers/FunTranslationsProvider'
import ProviderTester from './ProviderTester'

describe('FunTranslationsProvider', () => {
  let providerTester: ProviderTester

  beforeAll(() => {
    providerTester = new ProviderTester(
      new FunTranslationsProvider()
    )
  })

  test(
    'should get correct translation',
    async () => providerTester.positive({
      text: 'Evening', lang: 'vulcan', expected: 'Khru'
    })
  )

  test(
    'should fail because of invalid lang',
    async () => providerTester.negative()
  )
})