Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: some quality of life fixes #5

Merged

Conversation

virtuoushub
Copy link
Contributor

@virtuoushub virtuoushub commented Aug 10, 2024

Context:

Was using https://github.com/excaliburjs/template-ts-vite and noticed that npm run test was failing in my environment.

This led me down a bit of a rabbit hole to look into the @excaliburjs/testing code, which ultimately had me creating this PR.


changes


another note: after syncing with @eonarheim on discord, seems like using playwright similar to how the electron template is doing testing might be the approach to take for the vite template instead.


note: since the last release was almost 3 years ago, I'm not sure what the future of this package is.

that being said, I think it can benefit from some of these changes.

Also wondering if a different approach to this change is to update https://github.com/excaliburjs/template-ts-vite/blob/main/package.json#L11 / https://github.com/excaliburjs/template-ts-vite/blob/main/package.json#L35 to use https://github.com/excaliburjs/excalibur-jasmine instead since it was more recently updated.

solves:

```sh
...
$ npm run test> @excaliburjs/[email protected] test> node ./dist/src/cli.js -d ./test -t ./dist/test/test.jsRunning against static files in directory: ./testCurrent Dir: /workspaces/excalibur-testingLoading /workspaces/excalibur-testing/dist/test/test.jsLoaded /workspaces/excalibur-testing/dist/test/test.js/workspaces/excalibur-testing/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197            reject(new Error([                   ^Error: Failed to launch the browser process!/workspaces/excalibur-testing/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directoryTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md    at onClose (/workspaces/excalibur-testing/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)    at Interface.<anonymous> (/workspaces/excalibur-testing/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)    at Interface.emit (node:events:531:35)    at Interface.close (node:internal/readline/interface:528:10)    at Socket.onend (node:internal/readline/interface:254:10)    at Socket.emit (node:events:531:35)    at endReadableNT (node:internal/streams/readable:1696:12)    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)Node.js v20.15.1
...
```
@virtuoushub virtuoushub force-pushed the chore/some-quality-of-life-fixes branch from b0f3fa7 to 225d961 Compare August 11, 2024 02:52
@virtuoushub virtuoushub marked this pull request as ready for review August 19, 2024 21:41
@kamranayub
Copy link
Member

It would be great to have one approach to testing. I think Playwright is a good way forward if we are already using it (I know @eonarheim likes it a lot 😁).

I like the idea of the devcontainer, thanks for that 💯.

@kamranayub
Copy link
Member

kamranayub commented Aug 30, 2024

Probably should use Node 22 eh 😅 (workflow is using node 12)

@virtuoushub
Copy link
Contributor Author

Probably should use Node 22 eh 😅 (workflow is using node 12)

just pushed a change w/ Node 20 since it is currently long term service(LTS), but happy to bump to 22 too.

@eonarheim
Copy link
Member

@virtuoushub Thanks for the contribution! I'll 100% accept this.

Agree @kamranayub's, I think Playwright might solve all the problems excalibur-testing set out to solve.

@eonarheim eonarheim merged commit e96cbfa into excaliburjs:main Sep 3, 2024
1 check passed
@eonarheim
Copy link
Member

@virtuoushub Thanks again for the contribution!

@eonarheim
Copy link
Member

@virtuoushub Published!
image

@virtuoushub virtuoushub deleted the chore/some-quality-of-life-fixes branch September 14, 2024 00:07
@virtuoushub
Copy link
Contributor Author

@virtuoushub Thanks again for the contribution!

@eonarheim my pleasure, thanks for the feedback/review/merge!


Agree @kamranayub's, I think Playwright might solve all the problems excalibur-testing set out to solve.

I think so too. I am going to play around a little bit more with this approach and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants