fix: SEO SPA editor last fixes (3/4)
This commit is contained in:
1 parent
470584400f
commit
cb737b7ae3
19 files changed
+316
-147
No files matched your search
@@ -167,3 +167,20 @@ describe('parseDirectoryQuery', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('slugify parity with the API slug generator', () => {
|
||||
it.each([
|
||||
['Crème Brûlée à la façon', 'creme-brulee-a-la-facon'],
|
||||
['Straße œuvre Łódź', 'strasse-oeuvre-lodz'],
|
||||
['Ångström', 'angstrom'],
|
||||
['Tiếng Việt', 'ti-ng-vi-t'],
|
||||
[' --Hello, World!-- ', 'hello-world'],
|
||||
['', ''],
|
||||
])('turns %j into %j', (text, expected) => {
|
||||
expect(slugify(text, 100)).toBe(expected)
|
||||
})
|
||||
|
||||
it('cuts to the limit and drops a trailing dash', () => {
|
||||
expect(slugify('abcd efgh', 5)).toBe('abcd')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user