Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Commit

Permalink
100% integration code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Selden committed Jan 16, 2016
1 parent 9cb340b commit ded8c21
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 44 deletions.
45 changes: 45 additions & 0 deletions test/integration/ember-i18n-csv-test.js
@@ -0,0 +1,45 @@
import { expect } from 'chai';
import fs from 'fs-extra';
import { areFilesEqual, areDirsEqual } from 'fs-equal';
import emberI18nCsv from '../../lib/ember-i18n-csv';

describe('integration - ember-i18n-csv', function() {
beforeEach(function() {
fs.emptyDirSync('tmp');
fs.ensureDirSync('tmp/locales');
});

describe('to-csv', function() {
it('works', function() {
return emberI18nCsv('to-csv', 'test/fixtures/locales', 'tmp/i18n.csv').then(() => {
return areFilesEqual('tmp/i18n.csv', 'test/fixtures/i18n.csv').then(areSame => {
expect(areSame).to.be.true;
});
});
});
});

describe('to-js', function() {
it('works', function() {
return emberI18nCsv('to-js', 'tmp/locales', 'test/fixtures/i18n.csv').then(() => {
return areDirsEqual('tmp/locales', 'test/fixtures/locales').then(areSame => {
expect(areSame).to.be.true;
});
});
});

it('handles option --jshint-ignore', function() {
return emberI18nCsv('to-js', 'tmp/locales', 'test/fixtures/i18n.csv', { ignoreJshint: true }).then(() => {
return areDirsEqual('tmp/locales', 'test/fixtures/locales-jshint-ignore').then(areSame => {
expect(areSame).to.be.true;
});
});
});
});

it('handles invalid', function() {
return emberI18nCsv().catch(() => {
expect(true).to.be.true;
});
});
});
18 changes: 0 additions & 18 deletions test/integration/to-csv-test.js

This file was deleted.

26 changes: 0 additions & 26 deletions test/integration/to-js-test.js

This file was deleted.

0 comments on commit ded8c21

Please sign in to comment.