Skip to content

Commit

Permalink
fix: YAML nested export unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed Jan 31, 2022
1 parent 73bae01 commit a235ba8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/formatters/fixtures/simple-nested.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions api/src/formatters/yaml-nested.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

0 comments on commit a235ba8

Please sign in to comment.