Skip to content

Commit

Permalink
fix: include aegir config in interop and run from install dir (#389)
Browse files Browse the repository at this point in the history
Otherwise it can't find the tests.
  • Loading branch information
achingbrain authored Jan 17, 2024
1 parent a966706 commit a2229bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
"!**/*.tsbuildinfo",
".aegir.js"
],
"exports": {
".": {
Expand Down
9 changes: 8 additions & 1 deletion packages/interop/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
/* eslint-disable no-console */

import { spawn } from 'node:child_process'
import { dirname, resolve } from 'path'
import { fileURLToPath } from 'url'

const test = spawn('npx', ['aegir', 'test'])
// aegir should be run from `node_modules/@helia/interop`
const cwd = resolve(dirname(fileURLToPath(import.meta.url)), '../../')

const test = spawn('npx', ['aegir', 'test'], {
cwd
})

test.stdout.on('data', (data) => {
process.stdout.write(data)
Expand Down

0 comments on commit a2229bd

Please sign in to comment.