Skip to content

Commit

Permalink
fix: Test failed on Windows with ENOENT (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyguerra authored Nov 12, 2023
1 parent f11e5af commit c3c7afa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/hubot_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const assert = require('assert/strict')
const root = __dirname.replace(/test$/, '')
const { TextMessage, User } = require('../index.js')
const path = require('node:path')
const { spawn } = require('child_process')

describe('Running bin/hubot.js', () => {
it('should load adapter from HUBOT_FILE environment variable', async () => {
Expand All @@ -31,10 +32,9 @@ describe('Running bin/hubot.js', () => {
hubot.shutdown()
}
})
const { spawn } = require('child_process')

it('should output a help message when run with --help', (t, done) => {
const hubot = spawn('./bin/hubot', ['--help'])
const hubot = process.platform === 'win32' ? spawn('node', ['./bin/hubot.js', '--help']) : spawn('./bin/hubot', ['--help'])
const expected = `Usage: hubot [options]
-a, --adapter HUBOT_ADAPTER
-f, --file HUBOT_FILE
Expand Down

0 comments on commit c3c7afa

Please sign in to comment.