#12 Unit tests fail on first run

Closed
opened 1 year ago by kjhoerr · 1 comments
kjhoerr commented 1 year ago
Owner

On a "fresh" run of the unit tests (when the HOST_DIR directory is empty), the unit tests will fail because the template files don't exist yet.

This is mainly an async issue, since their creation is handled as Promises inside routes, which can't return Promises to Express. This should probably be handled by rearranging the code, so that the template creation can be properly handled as async. (Why are those files being created at route creation, anyways?)

IMO can improve the pipelines here a bit. Would like some separation between init processes and the server creation, and reduce surface area of various components. Async should be handled as root as possible so those pieces don't get lost during sync code.

On a "fresh" run of the unit tests (when the HOST_DIR directory is empty), the unit tests will fail because the template files don't exist yet. This is mainly an async issue, since their creation is handled as Promises inside routes, which can't return Promises to Express. This should probably be handled by rearranging the code, so that the template creation can be properly handled as async. (Why are those files being created at route creation, anyways?) IMO can improve the pipelines here a bit. Would like some separation between init processes and the server creation, and reduce surface area of various components. Async should be handled as root as possible so those pieces don't get lost during sync code.
kjhoerr added the
bug
label 1 year ago
kjhoerr commented 1 year ago
Poster
Owner

Resolved by this commit: ddecabba54

Resolved by this commit: ddecabba54
kjhoerr closed this issue 1 year ago
Sign in to join this conversation.
No Label
bug
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.