Documentation function executes a specified test case.

Function type signature
(case: () => {A with want: stream[C], input: B, fn: (<-: B) => stream[C]}) => stream[{C with _diff: string}] where C: Record
For more information, see Function type signatures.



(Required) Test case to run.


Define and execute a test case

import "csv"
import "testing"

inData =

outData =

t_sum = (table=<-) =>
        |> range(start: 2021-01-01T00:00:00Z, stop: 2021-01-03T01:00:00Z)
        |> sum()

test _sum = () => ({input: csv.from(csv: inData), want: csv.from(csv: outData), fn: t_sum}) _sum)

Was this page helpful?

Thank you for your feedback!

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.