23 lines
375 B
Go
23 lines
375 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)
|
|
|
|
assert.Nil(t, et.Set(EventTypeLoad))
|
|
assert.Nil(t, events.Set(et, EventHandler(`
|
|
print('hello world')
|
|
`)))
|
|
|
|
}
|