WIP: tests of api pkg

This commit is contained in:
Julien Neuhart
2019-07-09 22:22:22 +02:00
parent c7ecdcf625
commit 0c1e4e6888
8 changed files with 67 additions and 11 deletions

View File

@@ -7,6 +7,12 @@ import (
"github.com/stretchr/testify/assert"
)
func TestContext(t *testing.T) {
ctx, cancel := Context(1.5)
assert.NotNil(t, ctx)
assert.NotNil(t, cancel)
}
func TestDuration(t *testing.T) {
expected := time.Duration(1500) * time.Millisecond
result := Duration(1.5)