11import test from "ava" ;
22import { cleanQuery } from "../src/PicoQuery" ;
33
4- test ( "query = cleanQuery(query)" , function ( t ) {
4+ test ( "query = cleanQuery(query)" , function ( t ) {
55 try {
66 cleanQuery ( null ) ;
77 t . fail ( "should throw" ) ;
@@ -50,13 +50,13 @@ test("query = cleanQuery(query)", function(t) {
5050 cleanQuery ( {
5151 eci : "eci123" ,
5252 rid : "foo" ,
53- name : "bar"
53+ name : "bar" ,
5454 } ) ,
5555 {
5656 eci : "eci123" ,
5757 rid : "foo" ,
5858 name : "bar" ,
59- args : { }
59+ args : { } ,
6060 }
6161 ) ;
6262
@@ -66,13 +66,13 @@ test("query = cleanQuery(query)", function(t) {
6666 eci : "eci123" ,
6767 rid : "foo" ,
6868 name : "bar" ,
69- args : args
69+ args : args ,
7070 } ) ;
7171 t . deepEqual ( query , {
7272 eci : "eci123" ,
7373 rid : "foo" ,
7474 name : "bar" ,
75- args : args
75+ args : args ,
7676 } ) ;
7777 t . deepEqual ( query . args , args , "they should match before query.args mutates" ) ;
7878 query . args . what = "blah" ;
@@ -84,13 +84,13 @@ test("query = cleanQuery(query)", function(t) {
8484 eci : " eci123 " ,
8585 rid : " foo\n " ,
8686 name : " \t bar " ,
87- args : { " foo " : " don't trim these " }
87+ args : { " foo " : " don't trim these " } ,
8888 } ) ,
8989 {
9090 eci : "eci123" ,
9191 rid : "foo" ,
9292 name : "bar" ,
93- args : { " foo " : " don't trim these " }
93+ args : { " foo " : " don't trim these " } ,
9494 }
9595 ) ;
9696
@@ -100,13 +100,13 @@ test("query = cleanQuery(query)", function(t) {
100100 eci : "eci123" ,
101101 rid : "foo" ,
102102 name : "bar" ,
103- timestamp : new Date ( )
103+ timestamp : new Date ( ) ,
104104 } ) ,
105105 {
106106 eci : "eci123" ,
107107 rid : "foo" ,
108108 name : "bar" ,
109- args : { }
109+ args : { } ,
110110 }
111111 ) ;
112112
@@ -116,13 +116,13 @@ test("query = cleanQuery(query)", function(t) {
116116 eci : "eci123" ,
117117 rid : "foo" ,
118118 name : "bar" ,
119- for_rid : "rid"
119+ for_rid : "rid" ,
120120 } ) ,
121121 {
122122 eci : "eci123" ,
123123 rid : "foo" ,
124124 name : "bar" ,
125- args : { }
125+ args : { } ,
126126 }
127127 ) ;
128128
@@ -131,7 +131,7 @@ test("query = cleanQuery(query)", function(t) {
131131 eci : "eci123" ,
132132 rid : "foo" ,
133133 name : "bar" ,
134- args
134+ args,
135135 } ) . args ;
136136 }
137137
@@ -146,14 +146,15 @@ test("query = cleanQuery(query)", function(t) {
146146 const a = { one : 2 } ;
147147 const b = cleanArgs ( a ) ;
148148 t . false ( a === b , "must be a clone" ) ;
149+ // @ts -ignore
149150 t . deepEqual ( a , b ) ;
150151 b . extra = 3 ;
151152 t . notDeepEqual ( a , b ) ;
152153
153154 t . deepEqual (
154155 cleanArgs ( {
155156 one : 2 ,
156- three : function ( ) { }
157+ three : function ( ) { } ,
157158 } ) ,
158159 { one : 2 } ,
159160 "remove non-jsonable things"
@@ -165,7 +166,7 @@ test("query = cleanQuery(query)", function(t) {
165166 "args normalize to JSON null's"
166167 ) ;
167168
168- ( function ( a , b ) {
169+ ( function ( a , b ) {
169170 t . deepEqual (
170171 cleanArgs ( arguments ) ,
171172 { "0" : "foo" , "1" : "bar" } ,
0 commit comments