mirror of
https://github.com/FranzDiebold/github-env-vars-action.git
synced 2025-04-21 15:57:32 -05:00
Add slug values.
This commit is contained in:
parent
0a69a6c512
commit
19929f6cd1
6 changed files with 112 additions and 24 deletions
|
@ -1,7 +1,19 @@
|
|||
const {
|
||||
getRepositoryOwner, getRepositoryName, getRefName, getShaShort,
|
||||
slugify, getRepositoryOwner, getRepositoryName, getRefName, getShaShort,
|
||||
} = require('./index');
|
||||
|
||||
test('slugifies text', () => {
|
||||
expect(slugify(' /abc+efg*123/test§xyz ')).toEqual('abc-efg-123-test-xyz');
|
||||
});
|
||||
|
||||
test('slugifies ref name with dash', () => {
|
||||
expect(slugify('feat/feature-branch-1')).toEqual('feat-feature-branch-1');
|
||||
});
|
||||
|
||||
test('slugifies empty text', () => {
|
||||
expect(slugify('')).toEqual('');
|
||||
});
|
||||
|
||||
test('gets repository owner', () => {
|
||||
expect(getRepositoryOwner('FranzDiebold/github-env-vars-action'))
|
||||
.toEqual('FranzDiebold');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue