1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-03 00:46:51 +02:00
Files
ferret/pkg/drivers/cdp/eval/helpers_test.go
Tim Voronov e4e98830a0 Feature/eval template (#651)
* Refactored use of eval

* Disable unstable unit test
2021-09-07 16:33:30 -04:00

21 lines
468 B
Go

package eval
import (
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestWrapExp(t *testing.T) {
Convey("wrapExp", t, func() {
Convey("When a plain expression is passed", func() {
exp := "return true"
So(wrapExp(exp, 0), ShouldEqual, "() => {\n"+exp+"\n}")
})
Convey("When a plain expression is passed with args > 0", func() {
exp := "return true"
So(wrapExp(exp, 3), ShouldEqual, "(arg1,arg2,arg3) => {\n"+exp+"\n}")
})
})
}