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

Add Kino.Test.push_smart_cell_editor_source/2 to test editor changes #468

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/kino/test.ex
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ defmodule Kino.Test do
send(kino.pid, {:event, event, payload, %{origin: inspect(self())}})
end

@doc """
Sends an editor source event to a `Kino.JS.Live` kino.

## Examples

push_editor_source(kino, "source code")

"""
def push_editor_source(kino, source_code) do
send(kino.pid, {:editor_source, source_code})
end

@doc """
Connects to a `Kino.JS.Live` kino and returns the initial data.

Expand Down