Skip to content

Commit

Permalink
Remove platformDir since we now have tests running with staged localdev
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcdarunday committed Sep 12, 2024
1 parent 4e8ba80 commit 007cad8
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions test/05-commands.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ const minimal = path.join(Helper.root, 'test', 'fixtures', 'minimal')
class Rig {
setup = async ({ comment, timeout }) => {
timeout(180000)
this.platformDir = path.join(Helper.root, 'pear')
const helper = new Helper({ platformDir: this.platformDir })
const helper = new Helper()
this.helper = helper
comment('connecting local sidecar')
await helper.ready()
Expand All @@ -23,7 +22,7 @@ class Rig {
const testId = Math.floor(Math.random() * 100000)
const relativePath = path.relative(harness, minimal)
const argvInit = ['stage', '--json', 'test-' + testId, ...(name ? ['--name', name] : []), relativePath]
const stager = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const stager = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
await stager.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argvInit)})
`, { returnByValue: false })
Expand Down Expand Up @@ -59,7 +58,7 @@ test('pear stage --json <channel> <absolute-path>', async function ({ plan, alik

const argv = ['stage', '--json', 'test-' + testId, minimal]

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

await running.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand Down Expand Up @@ -120,7 +119,7 @@ test('pear seed <channel> <absolute-path>', async function ({ plan, is }) {
plan(1)
const { channel } = await rig.getOrCreateSeedInstance()

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', channel, minimal]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand All @@ -147,7 +146,7 @@ test('pear seed <channel> <relative-path>', async function ({ plan, is }) {
const { channel } = await rig.getOrCreateSeedInstance()

const relativePath = path.relative(harness, minimal)
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', channel, relativePath]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand All @@ -174,7 +173,7 @@ test('pear seed --json <channel> <relative-path>', async function ({ plan, is, a
const { channel } = await rig.getOrCreateSeedInstance()

const relativePath = path.relative(harness, minimal)
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', '--json', channel, relativePath]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand Down Expand Up @@ -208,7 +207,7 @@ test('pear seed --name <name> <channel> <relative-path>', async function ({ plan
const { channel } = await rig.getOrCreateSeedInstance(name)
const relativePath = path.relative(harness, minimal)

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', '--name', name, channel, relativePath]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand Down Expand Up @@ -236,7 +235,7 @@ test('pear seed --name <name> --json <channel> <relative-path>', async function
const { channel } = await rig.getOrCreateSeedInstance(name)
const relativePath = path.relative(harness, minimal)

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', '--name', name, '--json', channel, relativePath]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand Down Expand Up @@ -264,7 +263,7 @@ test('pear seed pear://<key>', async function ({ plan, is }) {
plan(1)
const { link } = await rig.getOrCreateSeedInstance()

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', link]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand All @@ -290,7 +289,7 @@ test('pear seed --json pear://<key>', async function ({ plan, is, alike }) {
plan(1)
const { link } = await rig.getOrCreateSeedInstance()

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', '--json', link]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand Down Expand Up @@ -323,7 +322,7 @@ test('pear seed --name <name> pear://<key>', async function ({ plan, is }) {
const name = 'custom-name-' + Math.floor(Math.random() * 100000)
const { link } = await rig.getOrCreateSeedInstance(name)

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', '--name', name, link]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand All @@ -350,7 +349,7 @@ test('pear seed --name <name> --json pear://<key>', async function ({ plan, is,
const name = 'custom-name-' + Math.floor(Math.random() * 100000)
const { link } = await rig.getOrCreateSeedInstance(name)

const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true, platformDir: rig.platformDir })
const seeder = await Helper.open(harness, { tags: ['exit'] }, { lineout: true })
const argv = ['seed', '--name', name, '--json', link]
await seeder.inspector.evaluate(`
__PEAR_TEST__.command(${JSON.stringify(argv)})
Expand Down

0 comments on commit 007cad8

Please sign in to comment.