mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 10:44:19 +00:00
refactor for cross platform use
This commit is contained in:
parent
090932e783
commit
18daf2c63f
15 changed files with 5626 additions and 23 deletions
19
__tests__/util.test.ts
Normal file
19
__tests__/util.test.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { isTag, paths } from '../src/util';
|
||||
import * as assert from 'assert';
|
||||
|
||||
describe('util', () => {
|
||||
describe('isTag', () => {
|
||||
it('returns true for tags', async () => {
|
||||
assert.equal(isTag('refs/tags/foo'), true)
|
||||
});
|
||||
it ('returns false for other kinds of refs', async () => {
|
||||
assert.equal(isTag('refs/heads/master'), false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('paths', () => {
|
||||
it('resolves files given a set of paths', async () => {
|
||||
assert.deepStrictEqual(paths(["tests/data/**/*"]), ['tests/data/foo/bar.txt'])
|
||||
});
|
||||
})
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue