@@ -13,11 +13,13 @@ local it = Jest.Globals.it
1313
1414describe (" InfluxDBEscapeUtils.measurement" , function ()
1515 it (" should pass through fine" , function ()
16- expect (InfluxDBEscapeUtils .measurement (" hi" )).toBe (" hi" )
16+ local measurement = InfluxDBEscapeUtils .measurement (" hi" )
17+ expect (measurement ).toBe (" hi" )
1718 end )
1819
1920 it (" should escape tabs" , function ()
20- expect (InfluxDBEscapeUtils .measurement (" \t hi" )).toBe (" \\ thi" )
21+ local measurement = InfluxDBEscapeUtils .measurement (" \t hi" )
22+ expect (measurement ).toBe (" \\ thi" )
2123 end )
2224end )
2325
3335
3436describe (" InfluxDBEscapeUtils.tag" , function ()
3537 it (" should pass through fine" , function ()
36- expect (InfluxDBEscapeUtils .tag (" hi" )).toBe (" hi" )
38+ local tag = InfluxDBEscapeUtils .tag (" hi" )
39+ expect (tag ).toBe (" hi" )
3740 end )
3841
3942 it (" should escape tabs" , function ()
40- expect (InfluxDBEscapeUtils .tag (" \t hi" )).toBe (" \\ thi" )
43+ local tag = InfluxDBEscapeUtils .tag (" \t hi" )
44+ expect (tag ).toBe (" \\ thi" )
4145 end )
4246
4347 it (" should escape =" , function ()
44- expect (InfluxDBEscapeUtils .tag (" =hi" )).toBe (" \\ =hi" )
48+ local tag = InfluxDBEscapeUtils .tag (" =hi" )
49+ expect (tag ).toBe (" \\ =hi" )
4550 end )
4651
4752 it (" should escape = and \\ " , function ()
48- expect (InfluxDBEscapeUtils .tag (" \\ =hi" )).toBe (" \\\\\\ =hi" )
53+ local tag = InfluxDBEscapeUtils .tag (" \\ =hi" )
54+ expect (tag ).toBe (" \\\\\\ =hi" )
4955 end )
5056
5157 it (" should escape \\ n" , function ()
52- expect (InfluxDBEscapeUtils .tag (" \n hi" )).toBe (" \\ nhi" )
58+ local tag = InfluxDBEscapeUtils .tag (" \n hi" )
59+ expect (tag ).toBe (" \\ nhi" )
5360 end )
5461end )
0 commit comments