jx/internal/folio/events_test.go
Matthew Rich a73acb8b93
Some checks failed
Lint / golangci-lint (push) Failing after 9m55s
Declarative Tests / test (push) Failing after 17s
add resource event handler types
2024-10-09 23:03:52 +00:00

23 lines
360 B
Go

// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package folio
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestNewEvent(t *testing.T) {
var et EventType
events := NewEvents()
assert.NotNil(t, events)
et.Set(EventTypeLoad)
assert.Nil(t, events.Set(et, EventHandler(`
print('hello world')
`)))
}