Add skip test

pull/251/head
Anton Medvedev 1 year ago
parent c09ea38b14
commit 686e9a8e3e
No known key found for this signature in database

@ -32,6 +32,8 @@ void async function main() {
}
}()
const skip = Symbol('skip')
async function runTransforms(json, args) {
const process = await import('node:process')
let i, code, output = json
@ -137,8 +139,6 @@ async function transform(json, code) {
}
}
const skip = Symbol('skip')
async function readStdinGenerator() {
const fs = await import('node:fs')
const {Buffer} = await import('node:buffer')

@ -120,6 +120,11 @@ void async function main() {
t.deepEqual(JSON.parse(stdout), [1, 2, 3])
})
await test('transform - skip', async t => {
const {stdout} = await run(42, `skip`)
t.equal(stdout, '')
})
await test('transform - invalid code argument', async t => {
const json = {foo: 'bar'}
const code = '".foo.toUpperCase("'

Loading…
Cancel
Save