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

Mock PL events dev convenience method #26

Merged
merged 11 commits into from
Nov 2, 2022
Merged

Mock PL events dev convenience method #26

merged 11 commits into from
Nov 2, 2022

Conversation

drzax
Copy link
Member

@drzax drzax commented Nov 1, 2022

This started as an addition to add a convenience method for mocking PL events while working in dev (see README.md) and ended with a revamp of the build process which I've bundled in this PR.

The size-limit check is failing because it's failing on main, not in this branch. So merging should fix that for future PRs too.

  • News web now has a generator meta tag for all outputs
  • Add a mockDecoyActivationEvents dev utility
  • Add new test for PL NEWS WEB application
  • Clean up dependencies and configure size-limit
  • Fix tests
  • tsdx -> tsup,eslint,jest
  • Fix husky

@drzax drzax requested a review from jtfell November 1, 2022 00:48
@drzax drzax marked this pull request as ready for review November 1, 2022 00:54
src/index.ts Outdated
function decoyEventMockHandler({ detail }: DecoyEvent) {
if (detail.active === true) {
window.dispatchEvent(
new CustomEvent<DecoyEventDetail>('decoyActive', {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use the PresentationLayerCustomEvents enum here, instead of the string

Copy link
Member Author

Choose a reason for hiding this comment

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

Good spot

@drzax drzax merged commit 86525a4 into main Nov 2, 2022
@drzax drzax deleted the mock-pl-events branch November 2, 2022 00:53
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.

None yet

2 participants