Skip to content

Commit

Permalink
test: extend presets test case
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Sep 15, 2024
1 parent 4081a9f commit 7dff7d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/core.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,14 @@ describe('core', () => {

describe('$({opts}) API', () => {
test('provides presets', async () => {
const $$ = $({ nothrow: true })
assert.equal((await $$`exit 1`).exitCode, 1)
const $1 = $({ nothrow: true })
assert.equal((await $1`exit 1`).exitCode, 1)

const $$$ = $$({ sync: true })
assert.equal($$$`exit 2`.exitCode, 2)
const $2 = $1({ sync: true })
assert.equal($2`exit 2`.exitCode, 2)

const $3 = $({ sync: true })({ nothrow: true })
assert.equal($3`exit 3`.exitCode, 3)
})

test('handles `input` option', async () => {
Expand Down

0 comments on commit 7dff7d3

Please sign in to comment.