mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
A slight change to the test cases to make sure the encoding is working for German and Spanish.
This commit is contained in:
parent
e22e15bc77
commit
a5da718bb0
@ -21,15 +21,15 @@ describe('uniqueSlug', () => {
|
||||
})
|
||||
|
||||
describe('Slug is transliterated correctly', () => {
|
||||
it('Converts umlaut to two letter equivalent', () => {
|
||||
it('Converts umlaut to a two letter equivalent', () => {
|
||||
const umlaut = 'ä';
|
||||
const isUnique = jest.fn().mockResolvedValue(true)
|
||||
expect(uniqueSlug(string, isUnique)).resolves.toEqual('ae');
|
||||
expect(uniqueSlug(umlaut, isUnique)).resolves.toEqual('ae');
|
||||
})
|
||||
|
||||
it('Removes Spanish enya ', () => {
|
||||
const enya = 'ñ';
|
||||
const isUnique = jest.fn().mockResolvedValue(true)
|
||||
expect(uniqueSlug(string, isUnique)).resolves.toEqual('n');
|
||||
expect(uniqueSlug(enya, isUnique)).resolves.toEqual('n');
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user