diff --git a/api/src/formatters/fixtures/simple-flat.yaml b/api/src/formatters/fixtures/simple-flat.yaml index 0f278ae7..7d3e476b 100644 --- a/api/src/formatters/fixtures/simple-flat.yaml +++ b/api/src/formatters/fixtures/simple-flat.yaml @@ -1,4 +1,4 @@ term.one: 'Current Plan: {{ project.plan.name }}' term two: '{VAR_PLURAL, plural, =0 {locales} =1 {locale} other {locales} }' TERM_THREE: Export format... -'term:four': hello there you\nthis should be in a newline +term:four: hello there you\nthis should be in a newline diff --git a/api/src/formatters/fixtures/simple-nested.yaml b/api/src/formatters/fixtures/simple-nested.yaml index dc6e0f1e..fe82c4c9 100644 --- a/api/src/formatters/fixtures/simple-nested.yaml +++ b/api/src/formatters/fixtures/simple-nested.yaml @@ -2,4 +2,4 @@ term: one: 'Current Plan: {{ project.plan.name }}' term two: '{VAR_PLURAL, plural, =0 {locales} =1 {locale} other {locales} }' TERM_THREE: Export format... -'term:four': hello there you\nthis should be in a newline +term:four: hello there you\nthis should be in a newline diff --git a/api/src/formatters/yaml-flat.spec.ts b/api/src/formatters/yaml-flat.spec.ts index 5957b595..58cb8d06 100644 --- a/api/src/formatters/yaml-flat.spec.ts +++ b/api/src/formatters/yaml-flat.spec.ts @@ -49,7 +49,7 @@ test('should fail if file is malformed, invalid or empty', async () => { }); test('should export yaml files', async () => { - const result = await yamlFlatExporter(simpleFormatFixture); - const expected = loadFixture('simple-flat.yaml'); + const result = (await yamlFlatExporter(simpleFormatFixture)).toString().split(/\r?\n/).filter(Boolean); + const expected = loadFixture('simple-flat.yaml').split(/\r?\n/).filter(Boolean); expect(result).toEqual(expected); }); diff --git a/api/src/formatters/yaml-nested.spec.ts b/api/src/formatters/yaml-nested.spec.ts index 0f67b782..6f21ea04 100644 --- a/api/src/formatters/yaml-nested.spec.ts +++ b/api/src/formatters/yaml-nested.spec.ts @@ -49,7 +49,7 @@ test('should fail if file is malformed, invalid or empty', async () => { }); test('should export yaml nested files', async () => { - const result = await yamlNestedExporter(simpleFormatFixture); - const expected = loadFixture('simple-nested.yaml'); + const result = (await yamlNestedExporter(simpleFormatFixture)).toString().split(/\r?\n/).filter(Boolean); + const expected = loadFixture('simple-nested.yaml').split(/\r?\n/).filter(Boolean); expect(result).toEqual(expected); });