Open fredcido opened 3 years ago
With the same setup as above, i do get the error:
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn /app/common/temp/node_modules/.pnpm/electron@6.1.12/node_modules/electron/dist/electron ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn /app/common/temp/node_modules/.pnpm/electron@6.1.12/node_modules/electron/dist/electron',
path: '/app/common/temp/node_modules/.pnpm/electron@6.1.12/node_modules/electron/dist/electron',
spawnargs: [
'/app/common/temp/node_modules/.pnpm/jest-electron@0.1.11_jest@26.6.3/node_modules/jest-electron/lib/electron/main/index'
]
}
maybe new version 0.1.12 solved it.
jest-electron does not throw error if some library is missing. I managed to solve this by installing the system libraries needed to run Electron headless and running "npm test" with "xvfb-run":
FROM node:14
COPY . /usr/src/app
WORKDIR /usr/src/app
ENV JEST_ELECTRON_STARTUP_ARGS='--no-sandbox'
RUN apt-get update && apt-get install -y \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgbm1 \
libgtk-3-0 \
libasound2 \
xvfb
RUN npm ci
CMD xvfb-run npm test
Hello all, I am trying to run the tests inside a docker container, following the steps, using the following configuration:
However, the tests hang, with no error message at all, I can't even get a clue on what's going on:
Any hint on what's going on? I can't see any log messages