style: fix code style

This commit is contained in:
Gajus Kuizinas
2016-11-01 15:26:29 +00:00
parent 7990da993f
commit 858085656b
17 changed files with 320 additions and 321 deletions
+23 -25
View File
@@ -3,59 +3,57 @@
import {
expect
} from 'chai';
import createIndexCode from './../src/utilities/createIndexCode';
import createIndexCode from '../src/utilities/createIndexCode';
import codeExample from './codeExample';
describe('createIndexCode()', () => {
it('describes no children', () => {
const indexCode = createIndexCode([]);
it('describes no children', () => {
const indexCode = createIndexCode([]);
expect(indexCode).to.equal(codeExample(`
expect(indexCode).to.equal(codeExample(`
'create index';
`));
});
it('describes a single child', () => {
const indexCode = createIndexCode(['foo']);
});
it('describes a single child', () => {
const indexCode = createIndexCode(['foo']);
expect(indexCode).to.equal(codeExample(`
expect(indexCode).to.equal(codeExample(`
'create index';
export foo from './foo';
`));
});
it('describes multiple children', () => {
const indexCode = createIndexCode(['bar', 'foo']);
});
it('describes multiple children', () => {
const indexCode = createIndexCode(['bar', 'foo']);
expect(indexCode).to.equal(codeExample(`
expect(indexCode).to.equal(codeExample(`
'create index';
export bar from './bar';
export foo from './foo';
`));
});
context('file with extension', () => {
it('removes the extension from the export statement', () => {
const indexCode = createIndexCode(['foo.js']);
});
context('file with extension', () => {
it('removes the extension from the export statement', () => {
const indexCode = createIndexCode(['foo.js']);
expect(indexCode).to.equal(codeExample(`
expect(indexCode).to.equal(codeExample(`
'create index';
export foo from './foo.js';
`));
});
});
context('multiple, unsorted', () => {
it('sorts the files', () => {
const indexCode = createIndexCode(['foo', 'bar']);
});
context('multiple, unsorted', () => {
it('sorts the files', () => {
const indexCode = createIndexCode(['foo', 'bar']);
expect(indexCode).to.equal(codeExample(`
expect(indexCode).to.equal(codeExample(`
'create index';
export bar from './bar';
export foo from './foo';
`));
});
});
});
});