Skip to content

Commit

Permalink
use electron-mocha to run tests in electron
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig committed Jun 11, 2019
1 parent 1b14a1b commit 8b82f0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"console-table-printer": "1.0.0-beta12",
"cors": "2.8.5",
"coveralls": "2.13.3",
"electron-mocha": "^8.0.2",
"electron-osx-sign": "0.4.11",
"eol": "0.9.1",
"eventsource": "1.0.7",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/test/scripts/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (options['inspect-brk']) {
}

commandAndArguments.args.push(
'node_modules/.bin/_mocha',
'node_modules/.bin/electron-mocha',
run
)

Expand All @@ -80,8 +80,8 @@ commandAndArguments.args.push(
'--timeout',
options['inspect-brk'] ? '40000000' : '10000',
'--recursive',
'--compilers',
'ts:@packages/ts/register,coffee:@packages/coffee/register',
'--require-main',
'@packages/ts/register,@packages/coffee/register',
'--reporter',
'mocha-multi-reporters',
'--reporter-options',
Expand Down
3 changes: 3 additions & 0 deletions packages/server/test/unit/timers_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ _ = require("lodash")
parent = require("#{root}timers/parent")

describe "timers/parent", ->
it "tests should be running in electron", ->
expect(process.versions.electron).to.not.be.undefined

context ".fix", ->
beforeEach ->
parent.restore()
Expand Down

0 comments on commit 8b82f0e

Please sign in to comment.