Skip to content

Commit

Permalink
fix: rework lib/bin.js inclusion in ipjx compile chain
Browse files Browse the repository at this point in the history
* was included as an import in test/node-test-bin.js just to get it in the
  compile chain
* mocha now doing ESM (I think) is loading node-test-bin.js as ESM and it's
  executing bin.js as it's loaded -- this didn't happen prior to mocha@10
* only seeing this in CI for Windows, could be to do with the way mocha is
  loaded for now
* moving the import to test/noop-bin-test.js which isn't run as part of the
  test suite, but will be picked up by `ipjs --tests`
  • Loading branch information
rvagg committed May 12, 2022
1 parent 67db9a3 commit 7b3cd32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions test/node-test-bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import process from 'process'
import path from 'path'
import { platform } from 'os'
import { fileURLToPath } from 'url'
// included here for ipjs compile tree
import bin from '../lib/bin.js' // eslint-disable-line

const { assert } = chai

Expand Down
3 changes: 3 additions & 0 deletions test/noop-bin-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// file included so ipjs will compile ../lib/bin.js
// this test file is not intended to be run or loaded
import bin from '../lib/bin.js' // eslint-disable-line

0 comments on commit 7b3cd32

Please sign in to comment.