Skip to content

Commit 591997c

Browse files
committed
Add tests for protocol from v3 to v4x4
1 parent 9a21384 commit 591997c

12 files changed

+2509
-6
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`#unit BoltProtocolV3 .packable() should pack not pack graph types (Node) 1`] = `"It is not allowed to pass nodes in query parameters, given: (c:a {a:\\"b\\"})"`;
4+
5+
exports[`#unit BoltProtocolV3 .packable() should pack not pack graph types (Path) 1`] = `"It is not allowed to pass paths in query parameters, given: [object Object]"`;
6+
7+
exports[`#unit BoltProtocolV3 .packable() should pack not pack graph types (PathSegment) 1`] = `"Cannot read properties of null (reading 'writeUInt8')"`;
8+
9+
exports[`#unit BoltProtocolV3 .packable() should pack not pack graph types (Relationship) 1`] = `"It is not allowed to pass relationships in query parameters, given: (e)-[:a {b:\\"c\\"}]->(f)"`;
10+
11+
exports[`#unit BoltProtocolV3 .packable() should pack not pack graph types (UnboundRelationship) 1`] = `"It is not allowed to pass unbound relationships in query parameters, given: -[:a {b:\\"c\\"}]->"`;
12+
13+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Date with less fields) 1`] = `"Wrong struct size for Date, expected 1 but was 0"`;
14+
15+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Date with more fields) 1`] = `"Wrong struct size for Date, expected 1 but was 2"`;
16+
17+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(DateTimeWithZoneId with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 2"`;
18+
19+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(DateTimeWithZoneId with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 4"`;
20+
21+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 2"`;
22+
23+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 4"`;
24+
25+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Duration with less fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 3"`;
26+
27+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Duration with more fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 5"`;
28+
29+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(LocalDateTime with less fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 1"`;
30+
31+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(LocalDateTime with more fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 3"`;
32+
33+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(LocalTime with less fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 0"`;
34+
35+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(LocalTime with more fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 2"`;
36+
37+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Node with less fields) 1`] = `"Wrong struct size for Node, expected 3 but was 2"`;
38+
39+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Node with more fields) 1`] = `"Wrong struct size for Node, expected 3 but was 4"`;
40+
41+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Path with less fields) 1`] = `"Wrong struct size for Path, expected 3 but was 2"`;
42+
43+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Path with more fields) 1`] = `"Wrong struct size for Path, expected 3 but was 4"`;
44+
45+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Point with less fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 2"`;
46+
47+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Point with more fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 4"`;
48+
49+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Point3D with less fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 3"`;
50+
51+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Point3D with more fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 5"`;
52+
53+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Relationship with less fields) 1`] = `"Wrong struct size for Relationship, expected 5 but was 4"`;
54+
55+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Relationship with more fields) 1`] = `"Wrong struct size for Relationship, expected 5 but was 8"`;
56+
57+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Time with less fields) 1`] = `"Wrong struct size for Time, expected 2 but was 1"`;
58+
59+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(Time with more fileds) 1`] = `"Wrong struct size for Time, expected 2 but was 3"`;
60+
61+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(UnboundRelationship with less fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 3 but was 2"`;
62+
63+
exports[`#unit BoltProtocolV3 .unpack() should not unpack with wrong size(UnboundRelationship with more fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 3 but was 4"`;
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`#unit BoltProtocolV4x0 .packable() should pack not pack graph types (Node) 1`] = `"It is not allowed to pass nodes in query parameters, given: (c:a {a:\\"b\\"})"`;
4+
5+
exports[`#unit BoltProtocolV4x0 .packable() should pack not pack graph types (Path) 1`] = `"It is not allowed to pass paths in query parameters, given: [object Object]"`;
6+
7+
exports[`#unit BoltProtocolV4x0 .packable() should pack not pack graph types (PathSegment) 1`] = `"Cannot read properties of null (reading 'writeUInt8')"`;
8+
9+
exports[`#unit BoltProtocolV4x0 .packable() should pack not pack graph types (Relationship) 1`] = `"It is not allowed to pass relationships in query parameters, given: (e)-[:a {b:\\"c\\"}]->(f)"`;
10+
11+
exports[`#unit BoltProtocolV4x0 .packable() should pack not pack graph types (UnboundRelationship) 1`] = `"It is not allowed to pass unbound relationships in query parameters, given: -[:a {b:\\"c\\"}]->"`;
12+
13+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Date with less fields) 1`] = `"Wrong struct size for Date, expected 1 but was 0"`;
14+
15+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Date with more fields) 1`] = `"Wrong struct size for Date, expected 1 but was 2"`;
16+
17+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(DateTimeWithZoneId with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 2"`;
18+
19+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(DateTimeWithZoneId with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 4"`;
20+
21+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 2"`;
22+
23+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 4"`;
24+
25+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Duration with less fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 3"`;
26+
27+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Duration with more fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 5"`;
28+
29+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(LocalDateTime with less fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 1"`;
30+
31+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(LocalDateTime with more fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 3"`;
32+
33+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(LocalTime with less fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 0"`;
34+
35+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(LocalTime with more fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 2"`;
36+
37+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Node with less fields) 1`] = `"Wrong struct size for Node, expected 3 but was 2"`;
38+
39+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Node with more fields) 1`] = `"Wrong struct size for Node, expected 3 but was 4"`;
40+
41+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Path with less fields) 1`] = `"Wrong struct size for Path, expected 3 but was 2"`;
42+
43+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Path with more fields) 1`] = `"Wrong struct size for Path, expected 3 but was 4"`;
44+
45+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Point with less fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 2"`;
46+
47+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Point with more fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 4"`;
48+
49+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Point3D with less fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 3"`;
50+
51+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Point3D with more fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 5"`;
52+
53+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Relationship with less fields) 1`] = `"Wrong struct size for Relationship, expected 5 but was 4"`;
54+
55+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Relationship with more fields) 1`] = `"Wrong struct size for Relationship, expected 5 but was 8"`;
56+
57+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Time with less fields) 1`] = `"Wrong struct size for Time, expected 2 but was 1"`;
58+
59+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(Time with more fileds) 1`] = `"Wrong struct size for Time, expected 2 but was 3"`;
60+
61+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(UnboundRelationship with less fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 3 but was 2"`;
62+
63+
exports[`#unit BoltProtocolV4x0 .unpack() should not unpack with wrong size(UnboundRelationship with more fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 3 but was 4"`;
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`#unit BoltProtocolV4x1 .packable() should pack not pack graph types (Node) 1`] = `"It is not allowed to pass nodes in query parameters, given: (c:a {a:\\"b\\"})"`;
4+
5+
exports[`#unit BoltProtocolV4x1 .packable() should pack not pack graph types (Path) 1`] = `"It is not allowed to pass paths in query parameters, given: [object Object]"`;
6+
7+
exports[`#unit BoltProtocolV4x1 .packable() should pack not pack graph types (PathSegment) 1`] = `"Cannot read properties of null (reading 'writeUInt8')"`;
8+
9+
exports[`#unit BoltProtocolV4x1 .packable() should pack not pack graph types (Relationship) 1`] = `"It is not allowed to pass relationships in query parameters, given: (e)-[:a {b:\\"c\\"}]->(f)"`;
10+
11+
exports[`#unit BoltProtocolV4x1 .packable() should pack not pack graph types (UnboundRelationship) 1`] = `"It is not allowed to pass unbound relationships in query parameters, given: -[:a {b:\\"c\\"}]->"`;
12+
13+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Date with less fields) 1`] = `"Wrong struct size for Date, expected 1 but was 0"`;
14+
15+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Date with more fields) 1`] = `"Wrong struct size for Date, expected 1 but was 2"`;
16+
17+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(DateTimeWithZoneId with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 2"`;
18+
19+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(DateTimeWithZoneId with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneId, expected 3 but was 4"`;
20+
21+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with less fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 2"`;
22+
23+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(DateTimeWithZoneOffset with more fields) 1`] = `"Wrong struct size for DateTimeWithZoneOffset, expected 3 but was 4"`;
24+
25+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Duration with less fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 3"`;
26+
27+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Duration with more fields) 1`] = `"Wrong struct size for Duration, expected 4 but was 5"`;
28+
29+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(LocalDateTime with less fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 1"`;
30+
31+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(LocalDateTime with more fields) 1`] = `"Wrong struct size for LocalDateTime, expected 2 but was 3"`;
32+
33+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(LocalTime with less fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 0"`;
34+
35+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(LocalTime with more fields) 1`] = `"Wrong struct size for LocalTime, expected 1 but was 2"`;
36+
37+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Node with less fields) 1`] = `"Wrong struct size for Node, expected 3 but was 2"`;
38+
39+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Node with more fields) 1`] = `"Wrong struct size for Node, expected 3 but was 4"`;
40+
41+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Path with less fields) 1`] = `"Wrong struct size for Path, expected 3 but was 2"`;
42+
43+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Path with more fields) 1`] = `"Wrong struct size for Path, expected 3 but was 4"`;
44+
45+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Point with less fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 2"`;
46+
47+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Point with more fields) 1`] = `"Wrong struct size for Point2D, expected 3 but was 4"`;
48+
49+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Point3D with less fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 3"`;
50+
51+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Point3D with more fields) 1`] = `"Wrong struct size for Point3D, expected 4 but was 5"`;
52+
53+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Relationship with less fields) 1`] = `"Wrong struct size for Relationship, expected 5 but was 4"`;
54+
55+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Relationship with more fields) 1`] = `"Wrong struct size for Relationship, expected 5 but was 8"`;
56+
57+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Time with less fields) 1`] = `"Wrong struct size for Time, expected 2 but was 1"`;
58+
59+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(Time with more fileds) 1`] = `"Wrong struct size for Time, expected 2 but was 3"`;
60+
61+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(UnboundRelationship with less fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 3 but was 2"`;
62+
63+
exports[`#unit BoltProtocolV4x1 .unpack() should not unpack with wrong size(UnboundRelationship with more fields) 1`] = `"Wrong struct size for UnboundRelationship, expected 3 but was 4"`;

0 commit comments

Comments
 (0)