mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 17:44:07 +02:00
use sane version of split
This commit is contained in:
parent
4db446a512
commit
c97af141f3
3 changed files with 15 additions and 7 deletions
|
|
@ -1,8 +1,13 @@
|
|||
import {extrasperse} from '../src/utils'
|
||||
import {extrasperse, saneSplit} from '../src/utils'
|
||||
|
||||
test('extrasperse', async() => {
|
||||
expect(extrasperse('-A', ["foo", "bar"])).toEqual(["-A", "foo", "-A", "bar"]);
|
||||
expect(extrasperse('-A', [])).toEqual([])
|
||||
expect(extrasperse('-A', [])).toEqual([]);
|
||||
});
|
||||
|
||||
test('saneSplit', async() => {
|
||||
expect(saneSplit("", /\s+/)).toEqual([]);
|
||||
expect(saneSplit("foo bar", /\s+/)).toEqual(["foo", "bar"]);
|
||||
})
|
||||
|
||||
// TODO: hopefully github actions will support integration tests
|
||||
Loading…
Add table
Add a link
Reference in a new issue