jx/internal/folio/events_test.go

23 lines
375 B
Go
Raw Permalink Normal View History

2024-10-09 23:03:52 +00:00
// 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)
2024-10-09 23:36:11 +00:00
assert.Nil(t, et.Set(EventTypeLoad))
2024-10-09 23:03:52 +00:00
assert.Nil(t, events.Set(et, EventHandler(`
print('hello world')
`)))
}