(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

@@ -5,7 +5,6 @@ import { KeyAsDefaultValuePostProcessor } from '../../src/post-processors/key-as
import { TranslationCollection } from '../../src/utils/translation.collection';
describe('KeyAsDefaultValuePostProcessor', () => {
let processor: PostProcessorInterface;
beforeEach(() => {
@@ -27,5 +26,4 @@ describe('KeyAsDefaultValuePostProcessor', () => {
'Use this key as value as well': 'Use this key as value as well'
});
});
});

View File

@@ -5,7 +5,6 @@ import { NullAsDefaultValuePostProcessor } from '../../src/post-processors/null-
import { TranslationCollection } from '../../src/utils/translation.collection';
describe('NullAsDefaultValuePostProcessor', () => {
let processor: PostProcessorInterface;
beforeEach(() => {
@@ -38,5 +37,4 @@ describe('NullAsDefaultValuePostProcessor', () => {
'String A': 'Streng A'
});
});
});

View File

@@ -5,15 +5,14 @@ import { PurgeObsoleteKeysPostProcessor } from '../../src/post-processors/purge-
import { TranslationCollection } from '../../src/utils/translation.collection';
describe('PurgeObsoleteKeysPostProcessor', () => {
let processor: PostProcessorInterface;
let postProcessor: PostProcessorInterface;
beforeEach(() => {
processor = new PurgeObsoleteKeysPostProcessor();
postProcessor = new PurgeObsoleteKeysPostProcessor();
});
it('should purge obsolete keys', () => {
const collection = new TranslationCollection({
const draft = new TranslationCollection({
'I am completely new': '',
'I already exist': '',
'I already exist but was not present in extract': ''
@@ -27,10 +26,9 @@ describe('PurgeObsoleteKeysPostProcessor', () => {
'I already exist but was not present in extract': ''
});
expect(processor.process(collection, extracted, existing).values).to.deep.equal({
expect(postProcessor.process(draft, extracted, existing).values).to.deep.equal({
'I am completely new': '',
'I already exist': ''
});
});
});

View File

@@ -5,7 +5,6 @@ import { SortByKeyPostProcessor } from '../../src/post-processors/sort-by-key.po
import { TranslationCollection } from '../../src/utils/translation.collection';
describe('SortByKeyPostProcessor', () => {
let processor: PostProcessorInterface;
beforeEach(() => {
@@ -14,20 +13,19 @@ describe('SortByKeyPostProcessor', () => {
it('should sort keys alphanumerically', () => {
const collection = new TranslationCollection({
'z': 'last value',
'a': 'a value',
z: 'last value',
a: 'a value',
'9': 'a numeric key',
'b': 'another value'
b: 'another value'
});
const extracted = new TranslationCollection();
const existing = new TranslationCollection();
expect(processor.process(collection, extracted, existing).values).to.deep.equal({
'9': 'a numeric key',
'a': 'a value',
'b': 'another value',
'z': 'last value'
a: 'a value',
b: 'another value',
z: 'last value'
});
});
});