Skip to content

Commit

Permalink
add tests todo
Browse files Browse the repository at this point in the history
  • Loading branch information
ruy-dan committed Jun 26, 2024
1 parent e076dec commit d19deb6
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions test/05-commands.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ const Helper = require('./helper')
const { pathname } = new URL(global.Pear.config.applink)
const fixture = path.join(pathname, 'test', 'fixtures', 'terminal')

test.todo('pear stage <channel> <dir>')
test.todo('pear stage --dry-run <channel> <dir>')
test.todo('pear stage --bare <channel> <dir>')
test.todo('pear stage --ignore <list> <channel> <dir>')
test.todo('pear stage --truncate <n> <channel> <dir>')
test.todo('pear stage --name <name> <channel> <dir>')

test('pear stage --json <channel> <dir>', async function ({ plan, comment, alike, is, teardown, timeout, execution }) {
plan(2)

Expand All @@ -19,7 +26,6 @@ test('pear stage --json <channel> <dir>', async function ({ plan, comment, alike

const argv = ['stage', '--json', 'test-' + testId, path.join(pathname, 'test', 'fixtures', 'terminal')]


const running = await Helper.open(fixture, { tags: ['exit'] }, { lineout: true })

await running.inspector.evaluate(`
Expand All @@ -30,15 +36,48 @@ test('pear stage --json <channel> <dir>', async function ({ plan, comment, alike
const seen = new Set()
const tags = []
for await (const line of running.lineout) {
let result = JSON.parse(line)
const result = JSON.parse(line)
if (seen.has(result.tag)) continue
seen.add(result.tag)
tags.push(result.tag)
if (result.tag === 'final') break
}
await running.inspector.evaluate(`__PEAR_TEST__.ipc.close()`, { returnByValue: false })
await running.inspector.evaluate('__PEAR_TEST__.ipc.close()', { returnByValue: false })
await running.inspector.close()
alike(tags, [ 'staging', 'byte-diff', 'summary', 'skipping', 'complete', 'addendum', 'final'])
alike(tags, ['staging', 'byte-diff', 'summary', 'skipping', 'complete', 'addendum', 'final'])
const { code } = await running.until.exit
is(code, 0)
})

test.todo('pear seed <channel> <dir>')
test.todo('pear seed --verbose <channel> <dir>')
test.todo('pear seed --seeders <channel> <dir>')
test.todo('pear seed --name <channel> <dir>')
test.todo('pear seed --json <channel> <dir>')

test.todo('pear release <channel> <dir>')
test.todo('pear release --checkout <n> <channel> <dir>')
test.todo('pear release --json <channel> <dir>')

test.todo('pear info <channel> <dir>')
test.todo('pear info --changelog <channel> <dir>')
test.todo('pear info --full-changelog <channel> <dir>')
test.todo('pear info --metadata <channel> <dir>')
test.todo('pear info --key <channel> <dir>')
test.todo('pear info --json <channel> <dir>')

test.todo('pear dump <link> <dir>')
test.todo('pear dump --checkout <n> <link> <dir>')
test.todo('pear dump --json <link> <dir>')

test.todo('pear shift <source> <destination>')
test.todo('pear shift --force <source> <destination>')
test.todo('pear shift --json <source> <destination>')

test.todo('pear gc releases')
test.todo('pear gc releases --json')
test.todo('pear gc sidecars')
test.todo('pear gc sidecars --json')

test.todo('pear versions')
test.todo('pear versions --json')

0 comments on commit d19deb6

Please sign in to comment.