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

Allow internal errors on BackendTask #476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miniBill
Copy link
Contributor

No description provided.

Copy link

netlify bot commented May 11, 2024

👷 Deploy request for elm-pages-todos pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit be3c1fa

@miniBill
Copy link
Contributor Author

poke

Copy link
Owner

@dillonkearns dillonkearns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good! Is there any way we could add an automated test of some kind to the CI? Could be something like just running an elm-pages script in CI and checking the output.

src/BackendTask.elm Outdated Show resolved Hide resolved
@miniBill
Copy link
Contributor Author

I've pushed a piece of test.sh that runs a script that will generate an internal error, but I'm not sure how to check the output from there

@dillonkearns
Copy link
Owner

The two options that come to mind are:

  1. Write a JS test (there are some examples in https://github.com/dillonkearns/elm-pages/blob/master/generator/test/route-sorting.test.js#L1-L2). They could use NodeJS to run the script and capture output and use the vitest test helpers to assert on the output. Could even use https://vitest.dev/api/expect.html#tomatchsnapshot.
  2. Use an elm-pages script as a test harness to execute the test script and check its output. Not sure if this is too self-referential or not, though, but seems like it could possibly work out decently.

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.

2 participants