fabasoad/translation-action

View on GitHub
src/__tests__/extract.spec.ts

Summary

Maintainability
A
0 mins
Test Coverage
import path from 'path';
import extract from '../extract';

describe('extract', () => {
  test('should extract text', () => {
    const text = 'some text';
    expect(extract(text)).toEqual(text);
  });

  test('should extract file content', () => {
    expect(extract(path.join(__dirname, 'text.txt')))
      .toEqual('Simple text for translation.');
  });
});