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

Unit tests. #1

Closed
4 tasks done
ioquatix opened this issue Apr 19, 2021 · 1 comment
Closed
4 tasks done

Unit tests. #1

ioquatix opened this issue Apr 19, 2021 · 1 comment
Assignees
Milestone

Comments

@ioquatix
Copy link
Member

ioquatix commented Apr 19, 2021

We need to introduce some unit tests. Specifically, we want to ensure that changes in the implementation won't break the interface used by the live gem. While it isn't a huge surface area, we should validate it so that we don't accidentally break it in the future.

  • replace message.
  • append message.
  • prepend message.
  • dispatch message.

In addition, I don't know much about how we should use dispatch for handling events. We need to write some documentation about how to handle client side events. I assume this is mostly going to be something like:

<div id="my" class="live">...</div>

We need to make it easy to attach event handlers, e.g.

my.addEventListener('start', (event) => my.video.start(event.details.timestamp))

On the server side:

tag.dispatch('start', {timestamp: 5})

Ideally we can bind this together into a simple and easy to use package. I might be thinking about this the wrong way, but sometimes the server would need to control specific things about the client element, i.e. if it was a movie player, set the current time of playback, etc. Welcome your ideas/thoughts here.

@ioquatix ioquatix added this to the v1.0 milestone Apr 19, 2021
@ioquatix
Copy link
Member Author

ioquatix commented May 4, 2024

I finished adding basic tests.

@ioquatix ioquatix closed this as completed May 4, 2024
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

No branches or pull requests

2 participants