Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('plural entry contains 2 msgstr', () => {
const result = mergeEntries({}, [{
msgid_plural: 'Many',
msgid: 'One',
}])
expect(result.translations[''].One.msgstr).toEqual(['', ''])
})
it('includes default charset and headers if included', () => {
const charset = 'UTF-8'
const expectedHeaders = {
'content-type': 'text/plain; charset=UTF-8',
'plural-forms': 'nplurals=2; plural=(n!=1);',
language: 'en_US',
}
const result = mergeEntries({}, [])
expect(result.charset).toEqual(charset)
expect(result.headers).toEqual(expectedHeaders)
})