Merge pull request #912 from influxdata/flux/diff-epsilon

Add 'epsilon' and 'verbose' parameters to 'testing.diff'
pull/937/head
Scott Anderson 2020-04-03 16:01:28 -06:00 committed by GitHub
commit a002c05550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 3 deletions

View File

@ -17,7 +17,11 @@ _**Function type:** Test_
```js
import "testing"
testing.diff(got: stream2, want: stream1)
testing.diff(
got: stream2,
want: stream1,
epsilon: 0.000000001
)
```
It matches tables from each stream with the same group keys.
@ -34,16 +38,22 @@ _The `testing.diff()` function can be used to perform in-line diffs in a query._
## Parameters
### got
The stream containing data to test.
Stream containing data to test.
_Defaults to piped-forward data (`<-`)._
_**Data type:** Object_
### want
The stream that contains the expected data to test against.
Stream that contains the expected data to test against.
_**Data type:** Object_
### epsilon
Specifies how far apart two **float** values can be, but still considered equal.
Defaults to `0.000000001`.
_**Data type:** Float_
## Examples
##### Diff separate streams