(chore) run prettier

This commit is contained in:
Kim Biesbjerg
2019-09-18 14:16:47 +02:00
parent 7d0d52429f
commit 306622b9a0
28 changed files with 61 additions and 113 deletions

View File

@@ -3,7 +3,6 @@ import { expect } from 'chai';
import { TranslationCollection } from '../../src/utils/translation.collection';
describe('StringCollection', () => {
let collection: TranslationCollection;
beforeEach(() => {
@@ -64,12 +63,15 @@ describe('StringCollection', () => {
it('should merge with other collection', () => {
collection = collection.add('oldKey', 'oldVal');
const newCollection = new TranslationCollection({ newKey: 'newVal' });
expect(collection.union(newCollection).values).to.deep.equal({ oldKey: 'oldVal', newKey: 'newVal' });
expect(collection.union(newCollection).values).to.deep.equal({
oldKey: 'oldVal',
newKey: 'newVal'
});
});
it('should intersect with passed collection', () => {
collection = collection.addKeys(['red', 'green', 'blue']);
const newCollection = new TranslationCollection( { red: '', blue: '' });
const newCollection = new TranslationCollection({ red: '', blue: '' });
expect(collection.intersect(newCollection).values).to.deep.equal({ red: '', blue: '' });
});
@@ -88,7 +90,10 @@ describe('StringCollection', () => {
it('should map values', () => {
collection = new TranslationCollection({ red: 'rød', green: 'grøn', blue: 'blå' });
collection = collection.map((key, val) => 'mapped value');
expect(collection.values).to.deep.equal({ red: 'mapped value', green: 'mapped value', blue: 'mapped value' });
expect(collection.values).to.deep.equal({
red: 'mapped value',
green: 'mapped value',
blue: 'mapped value'
});
});
});