The log below is shown after running the jest command, and then it remained hanging and nothing happened after that, no output at all.
> jest --maxWorkers=1
(process:4814): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(electron:4814): Gtk-WARNING **: cannot open display:
The text was updated successfully, but these errors were encountered:
hey @wongjiahau! running electron (or electron tests) require a display (or virtual display), and it seems like your CI server does not support it, hence you get the message
(electron:4814): Gtk-WARNING **: cannot open display:
language: node_jsnode_js: '10.16.0'# cache folder with Electron binary (https://github.com/electron/electron/blob/master/docs/tutorial/installation.md#cache)cache:
directories:
- ~/.cache# run with xvfb bc it's needed for Electron (https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-xvfb-run-wrapper)script: xvfb-run npm test
Hopefully this helps some folks! It might be worthwhile to officially document this for anyone who isn't knowledgeable about Electron + CI configuration. Can send a PR if this is agreed to be something that warrants officially documentation!
Configurations
Docker image
nikolaik/python-nodejs:latest
What happened?
The log below is shown after running the
jest
command, and then it remained hanging and nothing happened after that, no output at all.The text was updated successfully, but these errors were encountered: