mirror of
https://github.com/FranzDiebold/github-env-vars-action.git
synced 2025-04-21 15:57:32 -05:00
Truncate slug values to 63 characters.
This commit is contained in:
parent
960f2f11d8
commit
9d7426b893
3 changed files with 25 additions and 12 deletions
|
@ -6,6 +6,16 @@ test('slugifies text', () => {
|
|||
expect(slugify(' /abc+efg*123/test§xyz ')).toEqual('abc-efg-123-test-xyz');
|
||||
});
|
||||
|
||||
test('slugifies a text to a maximum length', () => {
|
||||
expect(slugify(' /abc+efg*123/test§xyz 1234567 /(ö) ', 16))
|
||||
.toEqual('abc-efg-123-test');
|
||||
});
|
||||
|
||||
test('slugifies a text to a maximum length with trailing dash', () => {
|
||||
expect(slugify(' /abc+efg*123/test§xyz 1234567 /(ö) ', 17))
|
||||
.toEqual('abc-efg-123-test');
|
||||
});
|
||||
|
||||
test('slugifies ref name with dash', () => {
|
||||
expect(slugify('feat/feature-branch-1')).toEqual('feat-feature-branch-1');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue