-
-
Notifications
You must be signed in to change notification settings - Fork 8
better error handling when loading tasks using esm #133
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
base: main
Are you sure you want to change the base?
Conversation
2145726
to
f311e20
Compare
const world = new TestWorld(options) | ||
|
||
// Load the task | ||
await asyncAssignTasks(world, `${__dirname}/fixtures/tasks/goodtasks`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand something here.
On line 12 we've defined goodtask
as () => Action<void>
but that's also what's defined in the goodtask.ts
fixture.
Should we be using the result of this call to asynAssignTasks
to set up the goodtask
property on our TestWorld
on line 12, instead of hard-coding / duplicating it?
|
||
// error compiling | ||
it('fails with a helpful error message if the task could not be compiled', async () => { | ||
class TestWorld extends ActorWorld { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need lines 26-30 for this test?
🤔 What's changed?
Better Error Handling when loading tasks in an ESM environment.
⚡️ What's your motivation?
The errors were getting swallowed, slowing the addition of tests.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.