mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-15 11:52:14 +01:00
WIP: tests of api pkg
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
// Package timeout helps managing
|
||||
// Package timeout helps creating
|
||||
// context with timeout.
|
||||
package timeout
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user