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 4 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 178621e

@miniBill miniBill force-pushed the fix-infinite-loop branch from e305345 to 000e889 Compare May 13, 2024 11:15
@miniBill
Copy link
Contributor Author

poke

@miniBill miniBill force-pushed the fix-infinite-loop branch 2 times, most recently from 8c367e7 to fc19db7 Compare September 25, 2024 21:15
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.

@miniBill
Copy link
Contributor Author

miniBill commented Oct 1, 2024

Ok, implemented a line in test.sh that checks for the internal error. Pre-patch that code would just explode

@miniBill miniBill requested a review from dillonkearns October 23, 2024 13:18
@miniBill miniBill force-pushed the fix-infinite-loop branch 2 times, most recently from 9577aa3 to 52848ed Compare December 9, 2024 13:33
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