-
Notifications
You must be signed in to change notification settings - Fork 124
fix(workflow): Throw if patches are used at Workflow top level #369
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
Conversation
23e0b71
to
46ba7f2
Compare
( | ||
j | ||
): j is NonNullableObject< | ||
Pick<coresdk.workflow_activation.IWFActivationJob, 'notifyHasPatch'> | ||
> => j.notifyHasPatch != null |
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.
Oh my god this is some nauseating formatting (I know it's auto-formatted, but, jesus)
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.
lol, I can declare the type somewhere else so the formatting is fixed
await context.evalClosure('lib.initRuntime($0, $1)', [options, isolateExtension.derefInto()], { | ||
arguments: { copy: true }, | ||
timeout: isolateExecutionTimeoutMs, | ||
}); |
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.
That's nicer
const { isReplaying } = state.info; | ||
const { isReplaying } = workflowInfo(); | ||
if (state.workflow === undefined) { | ||
throw new IllegalStateError('Patches cannot be used before Workflow starts'); |
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.
Lift string to constant for assertion in test?
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.
It's just 1 test, I can but I wouldn't bother
Closes #362