23 lines
360 B
Go
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')
|
||
|
`)))
|
||
|
|
||
|
}
|