@pact-foundation/pact 16.3.0 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CHANGELOG.md +16 -3
  2. package/CONTRIBUTING.md +2 -2
  3. package/README.md +6 -2
  4. package/package.json +25 -28
  5. package/src/common/graphQL/configurationError.js +2 -22
  6. package/src/common/graphQL/configurationError.js.map +1 -1
  7. package/src/common/graphQL/graphQL.d.ts +2 -2
  8. package/src/common/graphQL/graphQL.js +11 -14
  9. package/src/common/graphQL/graphQL.js.map +1 -1
  10. package/src/common/graphQL/graphQLQueryError.js +2 -22
  11. package/src/common/graphQL/graphQLQueryError.js.map +1 -1
  12. package/src/common/logger.js +9 -9
  13. package/src/common/logger.js.map +1 -1
  14. package/src/common/matchingRules.d.ts +1 -1
  15. package/src/common/matchingRules.js +21 -21
  16. package/src/common/matchingRules.js.map +1 -1
  17. package/src/common/net.js +36 -42
  18. package/src/common/net.js.map +1 -1
  19. package/src/common/net.spec.js +41 -53
  20. package/src/common/net.spec.js.map +1 -1
  21. package/src/common/request.js +33 -82
  22. package/src/common/request.js.map +1 -1
  23. package/src/common/request.spec.js +26 -26
  24. package/src/common/request.spec.js.map +1 -1
  25. package/src/common/spec.js +3 -4
  26. package/src/common/spec.js.map +1 -1
  27. package/src/dsl/apolloGraphql.js +7 -25
  28. package/src/dsl/apolloGraphql.js.map +1 -1
  29. package/src/dsl/apolloGraphql.spec.js +21 -18
  30. package/src/dsl/apolloGraphql.spec.js.map +1 -1
  31. package/src/dsl/graphql.d.ts +2 -2
  32. package/src/dsl/graphql.js +29 -48
  33. package/src/dsl/graphql.js.map +1 -1
  34. package/src/dsl/graphql.spec.js +81 -66
  35. package/src/dsl/graphql.spec.js.map +1 -1
  36. package/src/dsl/interaction.d.ts +2 -2
  37. package/src/dsl/interaction.js +41 -48
  38. package/src/dsl/interaction.js.map +1 -1
  39. package/src/dsl/interaction.spec.js +77 -70
  40. package/src/dsl/interaction.spec.js.map +1 -1
  41. package/src/dsl/matchers.d.ts +1 -1
  42. package/src/dsl/matchers.js +19 -31
  43. package/src/dsl/matchers.js.map +1 -1
  44. package/src/dsl/matchers.spec.js +199 -208
  45. package/src/dsl/matchers.spec.js.map +1 -1
  46. package/src/dsl/message.d.ts +3 -3
  47. package/src/dsl/options.d.ts +3 -3
  48. package/src/dsl/verifier/proxy/hooks.d.ts +2 -2
  49. package/src/dsl/verifier/proxy/hooks.js +42 -112
  50. package/src/dsl/verifier/proxy/hooks.js.map +1 -1
  51. package/src/dsl/verifier/proxy/hooks.spec.js +84 -199
  52. package/src/dsl/verifier/proxy/hooks.spec.js.map +1 -1
  53. package/src/dsl/verifier/proxy/messages.d.ts +2 -2
  54. package/src/dsl/verifier/proxy/messages.js +88 -106
  55. package/src/dsl/verifier/proxy/messages.js.map +1 -1
  56. package/src/dsl/verifier/proxy/parseBody.d.ts +1 -1
  57. package/src/dsl/verifier/proxy/parseBody.js +2 -2
  58. package/src/dsl/verifier/proxy/parseBody.js.map +1 -1
  59. package/src/dsl/verifier/proxy/parseBody.spec.js +31 -76
  60. package/src/dsl/verifier/proxy/parseBody.spec.js.map +1 -1
  61. package/src/dsl/verifier/proxy/proxy.d.ts +2 -2
  62. package/src/dsl/verifier/proxy/proxy.js +22 -26
  63. package/src/dsl/verifier/proxy/proxy.js.map +1 -1
  64. package/src/dsl/verifier/proxy/proxy.spec.js +14 -14
  65. package/src/dsl/verifier/proxy/proxy.spec.js.map +1 -1
  66. package/src/dsl/verifier/proxy/proxyRequest.d.ts +3 -3
  67. package/src/dsl/verifier/proxy/proxyRequest.js +7 -7
  68. package/src/dsl/verifier/proxy/proxyRequest.js.map +1 -1
  69. package/src/dsl/verifier/proxy/proxyRequest.spec.js +49 -64
  70. package/src/dsl/verifier/proxy/proxyRequest.spec.js.map +1 -1
  71. package/src/dsl/verifier/proxy/stateHandler/setupStates.d.ts +3 -3
  72. package/src/dsl/verifier/proxy/stateHandler/setupStates.js +14 -18
  73. package/src/dsl/verifier/proxy/stateHandler/setupStates.js.map +1 -1
  74. package/src/dsl/verifier/proxy/stateHandler/setupStates.spec.js +76 -159
  75. package/src/dsl/verifier/proxy/stateHandler/setupStates.spec.js.map +1 -1
  76. package/src/dsl/verifier/proxy/stateHandler/stateHandler.d.ts +2 -2
  77. package/src/dsl/verifier/proxy/stateHandler/stateHandler.js +23 -72
  78. package/src/dsl/verifier/proxy/stateHandler/stateHandler.js.map +1 -1
  79. package/src/dsl/verifier/proxy/stateHandler/stateHandler.spec.js +37 -85
  80. package/src/dsl/verifier/proxy/stateHandler/stateHandler.spec.js.map +1 -1
  81. package/src/dsl/verifier/proxy/tracer.d.ts +1 -1
  82. package/src/dsl/verifier/proxy/tracer.js +42 -35
  83. package/src/dsl/verifier/proxy/tracer.js.map +1 -1
  84. package/src/dsl/verifier/proxy/types.d.ts +5 -5
  85. package/src/dsl/verifier/types.d.ts +3 -3
  86. package/src/dsl/verifier/verifier.d.ts +1 -1
  87. package/src/dsl/verifier/verifier.js +49 -56
  88. package/src/dsl/verifier/verifier.js.map +1 -1
  89. package/src/dsl/verifier/verifier.spec.js +76 -93
  90. package/src/dsl/verifier/verifier.spec.js.map +1 -1
  91. package/src/errors/configurationError.js +2 -22
  92. package/src/errors/configurationError.js.map +1 -1
  93. package/src/errors/graphQLQueryError.js +2 -22
  94. package/src/errors/graphQLQueryError.js.map +1 -1
  95. package/src/errors/matcherError.js +2 -22
  96. package/src/errors/matcherError.js.map +1 -1
  97. package/src/errors/verificationError.js +2 -22
  98. package/src/errors/verificationError.js.map +1 -1
  99. package/src/httpPact/ffi.d.ts +2 -2
  100. package/src/httpPact/ffi.js +28 -29
  101. package/src/httpPact/ffi.js.map +1 -1
  102. package/src/httpPact/ffi.spec.js +30 -31
  103. package/src/httpPact/ffi.spec.js.map +1 -1
  104. package/src/httpPact/index.d.ts +3 -3
  105. package/src/httpPact/index.js +92 -149
  106. package/src/httpPact/index.js.map +1 -1
  107. package/src/httpPact/index.spec.js +75 -125
  108. package/src/httpPact/index.spec.js.map +1 -1
  109. package/src/httpPact/tracing.js +20 -28
  110. package/src/httpPact/tracing.js.map +1 -1
  111. package/src/index.js +1 -1
  112. package/src/index.js.map +1 -1
  113. package/src/messageConsumerPact.d.ts +3 -3
  114. package/src/messageConsumerPact.js +50 -51
  115. package/src/messageConsumerPact.js.map +1 -1
  116. package/src/messageConsumerPact.spec.js +50 -49
  117. package/src/messageConsumerPact.spec.js.map +1 -1
  118. package/src/messageProviderPact.d.ts +3 -3
  119. package/src/messageProviderPact.js +68 -85
  120. package/src/messageProviderPact.js.map +1 -1
  121. package/src/messageProviderPact.spec.js +75 -66
  122. package/src/messageProviderPact.spec.js.map +1 -1
  123. package/src/pact.integration.spec.js +250 -268
  124. package/src/pact.integration.spec.js.map +1 -1
  125. package/src/v3/display.d.ts +1 -1
  126. package/src/v3/display.js +44 -58
  127. package/src/v3/display.js.map +1 -1
  128. package/src/v3/ffi.d.ts +2 -2
  129. package/src/v3/ffi.js +18 -16
  130. package/src/v3/ffi.js.map +1 -1
  131. package/src/v3/ffi.spec.d.ts +1 -0
  132. package/src/v3/ffi.spec.js +50 -0
  133. package/src/v3/ffi.spec.js.map +1 -0
  134. package/src/v3/graphql/graphQL.d.ts +4 -4
  135. package/src/v3/graphql/graphQL.js +50 -75
  136. package/src/v3/graphql/graphQL.js.map +1 -1
  137. package/src/v3/matchers.d.ts +2 -2
  138. package/src/v3/matchers.js +112 -147
  139. package/src/v3/matchers.js.map +1 -1
  140. package/src/v3/matchers.spec.js +168 -187
  141. package/src/v3/matchers.spec.js.map +1 -1
  142. package/src/v3/pact.d.ts +2 -2
  143. package/src/v3/pact.js +103 -151
  144. package/src/v3/pact.js.map +1 -1
  145. package/src/v3/types.d.ts +1 -1
  146. package/src/v3/xml/xmlBuilder.d.ts +1 -3
  147. package/src/v3/xml/xmlBuilder.js +7 -9
  148. package/src/v3/xml/xmlBuilder.js.map +1 -1
  149. package/src/v3/xml/xmlElement.d.ts +2 -2
  150. package/src/v3/xml/xmlElement.js +24 -41
  151. package/src/v3/xml/xmlElement.js.map +1 -1
  152. package/src/v3/xml/xmlElement.spec.js +23 -25
  153. package/src/v3/xml/xmlElement.spec.js.map +1 -1
  154. package/src/v3/xml/xmlNode.js +2 -5
  155. package/src/v3/xml/xmlNode.js.map +1 -1
  156. package/src/v3/xml/xmlText.d.ts +1 -1
  157. package/src/v3/xml/xmlText.js +9 -25
  158. package/src/v3/xml/xmlText.js.map +1 -1
  159. package/src/v4/graphql/graphQLInteractionWithRequest.d.ts +4 -4
  160. package/src/v4/graphql/graphQLInteractionWithRequest.js +21 -17
  161. package/src/v4/graphql/graphQLInteractionWithRequest.js.map +1 -1
  162. package/src/v4/graphql/graphQLRequestBuilder.d.ts +3 -3
  163. package/src/v4/graphql/graphQLRequestBuilder.js +18 -20
  164. package/src/v4/graphql/graphQLRequestBuilder.js.map +1 -1
  165. package/src/v4/graphql/index.d.ts +6 -6
  166. package/src/v4/graphql/index.js +21 -17
  167. package/src/v4/graphql/index.js.map +1 -1
  168. package/src/v4/graphql/types.d.ts +5 -5
  169. package/src/v4/http/index.d.ts +2 -2
  170. package/src/v4/http/index.js +48 -93
  171. package/src/v4/http/index.js.map +1 -1
  172. package/src/v4/http/interactionWithCompleteRequest.d.ts +4 -7
  173. package/src/v4/http/interactionWithCompleteRequest.js +6 -10
  174. package/src/v4/http/interactionWithCompleteRequest.js.map +1 -1
  175. package/src/v4/http/interactionWithPlugin.d.ts +3 -3
  176. package/src/v4/http/interactionWithPlugin.js +14 -11
  177. package/src/v4/http/interactionWithPlugin.js.map +1 -1
  178. package/src/v4/http/interactionWithPluginRequest.d.ts +2 -2
  179. package/src/v4/http/interactionWithPluginRequest.js +11 -8
  180. package/src/v4/http/interactionWithPluginRequest.js.map +1 -1
  181. package/src/v4/http/interactionWithPluginResponse.d.ts +2 -2
  182. package/src/v4/http/interactionWithPluginResponse.js +10 -48
  183. package/src/v4/http/interactionWithPluginResponse.js.map +1 -1
  184. package/src/v4/http/interactionWithRequest.d.ts +2 -2
  185. package/src/v4/http/interactionWithRequest.js +11 -8
  186. package/src/v4/http/interactionWithRequest.js.map +1 -1
  187. package/src/v4/http/interactionWithResponse.d.ts +2 -2
  188. package/src/v4/http/interactionWithResponse.js +10 -48
  189. package/src/v4/http/interactionWithResponse.js.map +1 -1
  190. package/src/v4/http/requestBuilder.d.ts +3 -3
  191. package/src/v4/http/requestBuilder.js +32 -34
  192. package/src/v4/http/requestBuilder.js.map +1 -1
  193. package/src/v4/http/requestWithPluginBuilder.d.ts +2 -2
  194. package/src/v4/http/requestWithPluginBuilder.js +26 -46
  195. package/src/v4/http/requestWithPluginBuilder.js.map +1 -1
  196. package/src/v4/http/responseBuilder.d.ts +3 -3
  197. package/src/v4/http/responseBuilder.js +24 -25
  198. package/src/v4/http/responseBuilder.js.map +1 -1
  199. package/src/v4/http/responseWithPluginBuilder.d.ts +1 -1
  200. package/src/v4/http/responseWithPluginBuilder.js +5 -25
  201. package/src/v4/http/responseWithPluginBuilder.js.map +1 -1
  202. package/src/v4/http/types.d.ts +3 -2
  203. package/src/v4/http/unconfiguredInteraction.d.ts +6 -5
  204. package/src/v4/http/unconfiguredInteraction.js +31 -26
  205. package/src/v4/http/unconfiguredInteraction.js.map +1 -1
  206. package/src/v4/index.d.ts +4 -4
  207. package/src/v4/index.js +31 -35
  208. package/src/v4/index.js.map +1 -1
  209. package/src/v4/message/asynchronousMessage.d.ts +7 -6
  210. package/src/v4/message/asynchronousMessage.js +157 -190
  211. package/src/v4/message/asynchronousMessage.js.map +1 -1
  212. package/src/v4/message/index.d.ts +7 -6
  213. package/src/v4/message/index.js +188 -217
  214. package/src/v4/message/index.js.map +1 -1
  215. package/src/v4/message/types.d.ts +5 -3
  216. package/src/v4/types.d.ts +3 -3
@@ -1,33 +1,22 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
- var chai_1 = require("chai");
15
- var matchers_1 = require("./matchers");
16
- describe('Matcher', function () {
17
- describe('can compile the types', function () {
18
- describe('with interfaces', function () {
19
- it('compiles with nested examples from issue 1054', function () {
20
- var f = { a: 'working example' };
3
+ const chai_1 = require("chai");
4
+ const matchers_1 = require("./matchers");
5
+ describe('Matcher', () => {
6
+ describe('can compile the types', () => {
7
+ describe('with interfaces', () => {
8
+ it('compiles with nested examples from issue 1054', () => {
9
+ const f = { a: 'working example' };
21
10
  (0, matchers_1.like)(f);
22
- (0, matchers_1.like)(__assign({}, f));
11
+ (0, matchers_1.like)({ ...f });
23
12
  (0, matchers_1.like)(Object.freeze(f));
24
- var r = { id: 'some guid', foo: { a: 'example' } };
13
+ const r = { id: 'some guid', foo: { a: 'example' } };
25
14
  (0, matchers_1.like)(r);
26
- (0, matchers_1.like)(__assign({}, r));
15
+ (0, matchers_1.like)({ ...r });
27
16
  (0, matchers_1.like)(Object.freeze(f));
28
17
  });
29
- it('compiles when InterfaceToTemplate is used', function () {
30
- var template = {
18
+ it('compiles when InterfaceToTemplate is used', () => {
19
+ const template = {
31
20
  someArray: ['one', 'two'],
32
21
  someNumber: 1,
33
22
  someString: "it's a string",
@@ -36,12 +25,12 @@ describe('Matcher', function () {
36
25
  bar: 'some other string',
37
26
  },
38
27
  };
39
- var unused = (0, matchers_1.like)(template);
28
+ const _unused = (0, matchers_1.like)(template);
40
29
  });
41
30
  });
42
- describe('with types', function () {
43
- it('compiles', function () {
44
- var template = {
31
+ describe('with types', () => {
32
+ it('compiles', () => {
33
+ const template = {
45
34
  someArray: ['one', 'two'],
46
35
  someNumber: 1,
47
36
  someString: "it's a string",
@@ -50,11 +39,11 @@ describe('Matcher', function () {
50
39
  bar: 'some other string',
51
40
  },
52
41
  };
53
- var unused = (0, matchers_1.like)(template);
42
+ const _unused = (0, matchers_1.like)(template);
54
43
  });
55
44
  });
56
- it('compiles nested likes', function () {
57
- var unused = (0, matchers_1.like)({
45
+ it('compiles nested likes', () => {
46
+ const _unused = (0, matchers_1.like)({
58
47
  someArray: ['one', 'two'],
59
48
  someNumber: (0, matchers_1.like)(1),
60
49
  someString: "it's a string",
@@ -65,53 +54,54 @@ describe('Matcher', function () {
65
54
  });
66
55
  });
67
56
  });
68
- describe('#validateExample', function () {
69
- describe('when given a valid regex', function () {
70
- describe('and a matching example', function () {
71
- it('returns true', function () {
57
+ describe('#validateExample', () => {
58
+ describe('when given a valid regex', () => {
59
+ describe('and a matching example', () => {
60
+ it('returns true', () => {
72
61
  (0, chai_1.expect)((0, matchers_1.validateExample)('2010-01-01', matchers_1.ISO8601_DATE_FORMAT)).to.eql(true);
73
62
  });
74
63
  });
75
- describe('and a failing example', function () {
76
- it('returns false', function () {
64
+ describe('and a failing example', () => {
65
+ it('returns false', () => {
77
66
  (0, chai_1.expect)((0, matchers_1.validateExample)('not a date', matchers_1.ISO8601_DATE_FORMAT)).to.eql(false);
78
67
  });
79
68
  });
80
69
  });
81
- describe('when given an invalid regex', function () {
82
- it('returns an error', function () {
83
- (0, chai_1.expect)(function () {
70
+ describe('when given an invalid regex', () => {
71
+ it('returns an error', () => {
72
+ (0, chai_1.expect)(() => {
84
73
  (0, matchers_1.validateExample)('', 'abc(');
85
74
  }).to.throw(Error);
86
75
  });
87
76
  });
88
77
  });
89
- describe('#term', function () {
90
- describe('when given a valid regular expression and example', function () {
91
- it('returns a serialized Ruby object', function () {
92
- var expected = {
78
+ describe('#term', () => {
79
+ describe('when given a valid regular expression and example', () => {
80
+ it('returns a serialized Ruby object', () => {
81
+ const expected = {
93
82
  value: 'myawesomeword',
94
83
  regex: '\\w+',
95
84
  'pact:matcher:type': 'regex',
96
85
  };
97
- var match = (0, matchers_1.term)({
86
+ const match = (0, matchers_1.term)({
98
87
  generate: 'myawesomeword',
99
88
  matcher: '\\w+',
100
89
  });
101
90
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
102
91
  });
103
92
  });
104
- describe('when not provided with a valid expression', function () {
105
- var createTheTerm = function (badArg) { return function () {
93
+ describe('when not provided with a valid expression', () => {
94
+ // biome-ignore lint/suspicious/noExplicitAny: intentionally passing invalid argument types to test error handling
95
+ const createTheTerm = (badArg) => () => {
106
96
  (0, matchers_1.term)(badArg);
107
- }; };
108
- describe('when no term is provided', function () {
109
- it('throws an Error', function () {
110
- (0, chai_1.expect)(createTheTerm.call({})).to.throw(Error);
97
+ };
98
+ describe('when no term is provided', () => {
99
+ it('throws an Error', () => {
100
+ (0, chai_1.expect)(createTheTerm.call({}, undefined)).to.throw(Error);
111
101
  });
112
102
  });
113
- describe('when an invalid term is provided', function () {
114
- it('throws an Error', function () {
103
+ describe('when an invalid term is provided', () => {
104
+ it('throws an Error', () => {
115
105
  (0, chai_1.expect)(createTheTerm({})).to.throw(Error);
116
106
  (0, chai_1.expect)(createTheTerm('')).to.throw(Error);
117
107
  (0, chai_1.expect)(createTheTerm({ value: 'foo' })).to.throw(Error);
@@ -119,9 +109,9 @@ describe('Matcher', function () {
119
109
  });
120
110
  });
121
111
  });
122
- describe("when given an example that doesn't match the regular expression", function () {
123
- it('fails with an error', function () {
124
- (0, chai_1.expect)(function () {
112
+ describe("when given an example that doesn't match the regular expression", () => {
113
+ it('fails with an error', () => {
114
+ (0, chai_1.expect)(() => {
125
115
  (0, matchers_1.term)({
126
116
  generate: 'abc',
127
117
  matcher: matchers_1.ISO8601_DATE_FORMAT,
@@ -130,90 +120,91 @@ describe('Matcher', function () {
130
120
  });
131
121
  });
132
122
  });
133
- describe('#somethingLike', function () {
134
- describe('when provided a value', function () {
135
- it('returns a serialized Ruby object', function () {
136
- var expected = {
123
+ describe('#somethingLike', () => {
124
+ describe('when provided a value', () => {
125
+ it('returns a serialized Ruby object', () => {
126
+ const expected = {
137
127
  value: 'myspecialvalue',
138
128
  'pact:matcher:type': 'type',
139
129
  };
140
- var match = (0, matchers_1.somethingLike)('myspecialvalue');
130
+ const match = (0, matchers_1.somethingLike)('myspecialvalue');
141
131
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
142
132
  });
143
133
  });
144
- describe('when not provided with a valid value', function () {
145
- var createTheValue = function (badArg) { return function () {
134
+ describe('when not provided with a valid value', () => {
135
+ // biome-ignore lint/suspicious/noExplicitAny: intentionally passing invalid argument types to test error handling
136
+ const createTheValue = (badArg) => () => {
146
137
  (0, matchers_1.somethingLike)(badArg);
147
- }; };
148
- describe('when no value is provided', function () {
149
- it('`throws an Error', function () {
150
- (0, chai_1.expect)(createTheValue.call({})).to.throw(Error);
138
+ };
139
+ describe('when no value is provided', () => {
140
+ it('`throws an Error', () => {
141
+ (0, chai_1.expect)(createTheValue.call({}, undefined)).to.throw(Error);
151
142
  });
152
143
  });
153
- describe('when an invalid value is provided', function () {
154
- it('throws an Error', function () {
144
+ describe('when an invalid value is provided', () => {
145
+ it('throws an Error', () => {
155
146
  (0, chai_1.expect)(createTheValue(undefined)).to.throw(Error);
156
- (0, chai_1.expect)(createTheValue(function () { })).to.throw(Error);
147
+ (0, chai_1.expect)(createTheValue(() => { })).to.throw(Error);
157
148
  });
158
149
  });
159
150
  });
160
151
  });
161
- describe('#eachLike', function () {
162
- describe('when content is null', function () {
163
- it('provides null as contents', function () {
164
- var expected = {
152
+ describe('#eachLike', () => {
153
+ describe('when content is null', () => {
154
+ it('provides null as contents', () => {
155
+ const expected = {
165
156
  value: [null],
166
157
  'pact:matcher:type': 'type',
167
158
  min: 1,
168
159
  };
169
- var match = (0, matchers_1.eachLike)(null, { min: 1 });
160
+ const match = (0, matchers_1.eachLike)(null, { min: 1 });
170
161
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
171
162
  });
172
163
  });
173
- describe('when an object is provided', function () {
174
- it('provides the object as contents', function () {
175
- var expected = {
164
+ describe('when an object is provided', () => {
165
+ it('provides the object as contents', () => {
166
+ const expected = {
176
167
  value: [{ a: 1 }],
177
168
  'pact:matcher:type': 'type',
178
169
  min: 1,
179
170
  };
180
- var match = (0, matchers_1.eachLike)({ a: 1 }, { min: 1 });
171
+ const match = (0, matchers_1.eachLike)({ a: 1 }, { min: 1 });
181
172
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
182
173
  });
183
174
  });
184
- describe('when object.min is invalid', function () {
185
- it('throws an Error message', function () {
186
- (0, chai_1.expect)(function () {
175
+ describe('when object.min is invalid', () => {
176
+ it('throws an Error message', () => {
177
+ (0, chai_1.expect)(() => {
187
178
  (0, matchers_1.eachLike)({ a: 1 }, { min: 0 });
188
179
  }).to.throw(Error);
189
180
  });
190
181
  });
191
- describe('when an array is provided', function () {
192
- it('provides the array as contents', function () {
193
- var expected = {
182
+ describe('when an array is provided', () => {
183
+ it('provides the array as contents', () => {
184
+ const expected = {
194
185
  value: [[1, 2, 3]],
195
186
  'pact:matcher:type': 'type',
196
187
  min: 1,
197
188
  };
198
- var match = (0, matchers_1.eachLike)([1, 2, 3], { min: 1 });
189
+ const match = (0, matchers_1.eachLike)([1, 2, 3], { min: 1 });
199
190
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
200
191
  });
201
192
  });
202
- describe('when a value is provided', function () {
203
- it('adds the value in contents', function () {
204
- var expected = {
193
+ describe('when a value is provided', () => {
194
+ it('adds the value in contents', () => {
195
+ const expected = {
205
196
  value: ['test'],
206
197
  'pact:matcher:type': 'type',
207
198
  min: 1,
208
199
  };
209
- var match = (0, matchers_1.eachLike)('test', { min: 1 });
200
+ const match = (0, matchers_1.eachLike)('test', { min: 1 });
210
201
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
211
202
  });
212
203
  });
213
- describe('when the content has Pact.Macters', function () {
214
- describe('of type somethingLike', function () {
215
- it('nests somethingLike correctly', function () {
216
- var expected = {
204
+ describe('when the content has Pact.Macters', () => {
205
+ describe('of type somethingLike', () => {
206
+ it('nests somethingLike correctly', () => {
207
+ const expected = {
217
208
  value: [
218
209
  {
219
210
  id: {
@@ -225,13 +216,13 @@ describe('Matcher', function () {
225
216
  'pact:matcher:type': 'type',
226
217
  min: 1,
227
218
  };
228
- var match = (0, matchers_1.eachLike)({ id: (0, matchers_1.somethingLike)(10) }, { min: 1 });
219
+ const match = (0, matchers_1.eachLike)({ id: (0, matchers_1.somethingLike)(10) }, { min: 1 });
229
220
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
230
221
  });
231
222
  });
232
- describe('of type term', function () {
233
- it('nests term correctly', function () {
234
- var expected = {
223
+ describe('of type term', () => {
224
+ it('nests term correctly', () => {
225
+ const expected = {
235
226
  value: [
236
227
  {
237
228
  colour: {
@@ -244,7 +235,7 @@ describe('Matcher', function () {
244
235
  'pact:matcher:type': 'type',
245
236
  min: 1,
246
237
  };
247
- var match = (0, matchers_1.eachLike)({
238
+ const match = (0, matchers_1.eachLike)({
248
239
  colour: (0, matchers_1.term)({
249
240
  generate: 'red',
250
241
  matcher: 'red|green',
@@ -254,9 +245,9 @@ describe('Matcher', function () {
254
245
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
255
246
  });
256
247
  });
257
- describe('of type eachLike', function () {
258
- it('nests eachlike in contents', function () {
259
- var expected = {
248
+ describe('of type eachLike', () => {
249
+ it('nests eachlike in contents', () => {
250
+ const expected = {
260
251
  value: [
261
252
  {
262
253
  value: ['blue'],
@@ -267,13 +258,13 @@ describe('Matcher', function () {
267
258
  'pact:matcher:type': 'type',
268
259
  min: 1,
269
260
  };
270
- var match = (0, matchers_1.eachLike)((0, matchers_1.eachLike)('blue', { min: 1 }), { min: 1 });
261
+ const match = (0, matchers_1.eachLike)((0, matchers_1.eachLike)('blue', { min: 1 }), { min: 1 });
271
262
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
272
263
  });
273
264
  });
274
- describe('complex object with multiple Pact.Matchers', function () {
275
- it('nests objects correctly', function () {
276
- var expected = {
265
+ describe('complex object with multiple Pact.Matchers', () => {
266
+ it('nests objects correctly', () => {
267
+ const expected = {
277
268
  value: [
278
269
  {
279
270
  value: [
@@ -322,7 +313,7 @@ describe('Matcher', function () {
322
313
  'pact:matcher:type': 'type',
323
314
  min: 1,
324
315
  };
325
- var match = (0, matchers_1.eachLike)((0, matchers_1.eachLike)({
316
+ const match = (0, matchers_1.eachLike)((0, matchers_1.eachLike)({
326
317
  colour: (0, matchers_1.term)({ generate: 'red', matcher: 'red|green|blue' }),
327
318
  size: (0, matchers_1.somethingLike)(10),
328
319
  tag: (0, matchers_1.eachLike)([(0, matchers_1.somethingLike)('jumper'), (0, matchers_1.somethingLike)('shirt')], { min: 2 }),
@@ -331,214 +322,214 @@ describe('Matcher', function () {
331
322
  });
332
323
  });
333
324
  });
334
- describe('When no options.min is not provided', function () {
335
- it('defaults to a min of 1', function () {
336
- var expected = {
325
+ describe('When no options.min is not provided', () => {
326
+ it('defaults to a min of 1', () => {
327
+ const expected = {
337
328
  value: [{ a: 1 }],
338
329
  'pact:matcher:type': 'type',
339
330
  min: 1,
340
331
  };
341
- var match = (0, matchers_1.eachLike)({ a: 1 });
332
+ const match = (0, matchers_1.eachLike)({ a: 1 });
342
333
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
343
334
  });
344
335
  });
345
- describe('When a options.min is provided', function () {
346
- it('provides the object as contents', function () {
347
- var expected = {
336
+ describe('When a options.min is provided', () => {
337
+ it('provides the object as contents', () => {
338
+ const expected = {
348
339
  value: [{ a: 1 }, { a: 1 }, { a: 1 }],
349
340
  'pact:matcher:type': 'type',
350
341
  min: 3,
351
342
  };
352
- var match = (0, matchers_1.eachLike)({ a: 1 }, { min: 3 });
343
+ const match = (0, matchers_1.eachLike)({ a: 1 }, { min: 3 });
353
344
  (0, chai_1.expect)(JSON.stringify(match)).to.deep.include(JSON.stringify(expected));
354
345
  });
355
346
  });
356
347
  });
357
- describe('#email', function () {
358
- describe('when given a valid Email address', function () {
359
- it('creates a valid matcher', function () {
348
+ describe('#email', () => {
349
+ describe('when given a valid Email address', () => {
350
+ it('creates a valid matcher', () => {
360
351
  (0, chai_1.expect)((0, matchers_1.email)('hello@world.com')).to.be.an('object');
361
352
  (0, chai_1.expect)((0, matchers_1.email)('hello@world.com.au')).to.be.an('object');
362
353
  (0, chai_1.expect)((0, matchers_1.email)('hello@a.co')).to.be.an('object');
363
354
  (0, chai_1.expect)((0, matchers_1.email)()).to.be.an('object');
364
355
  });
365
356
  });
366
- describe('when given an invalid Email address', function () {
367
- it('returns an error', function () {
368
- (0, chai_1.expect)(function () {
357
+ describe('when given an invalid Email address', () => {
358
+ it('returns an error', () => {
359
+ (0, chai_1.expect)(() => {
369
360
  (0, matchers_1.email)('hello.world.c');
370
361
  }).to.throw(Error);
371
362
  });
372
363
  });
373
364
  });
374
- describe('#uuid', function () {
375
- describe('when given a valid UUID', function () {
376
- it('creates a valid matcher', function () {
365
+ describe('#uuid', () => {
366
+ describe('when given a valid UUID', () => {
367
+ it('creates a valid matcher', () => {
377
368
  (0, chai_1.expect)((0, matchers_1.uuid)('ce118b6e-d8e1-11e7-9296-cec278b6b50a')).to.be.an('object');
378
369
  (0, chai_1.expect)((0, matchers_1.uuid)()).to.be.an('object');
379
370
  });
380
371
  });
381
- describe('when given an invalid UUID', function () {
382
- it('returns an error', function () {
383
- (0, chai_1.expect)(function () {
372
+ describe('when given an invalid UUID', () => {
373
+ it('returns an error', () => {
374
+ (0, chai_1.expect)(() => {
384
375
  (0, matchers_1.uuid)('abc');
385
376
  }).to.throw(Error);
386
377
  });
387
378
  });
388
379
  });
389
- describe('#ipv4Address', function () {
390
- describe('when given a valid ipv4Address', function () {
391
- it('creates a valid matcher', function () {
380
+ describe('#ipv4Address', () => {
381
+ describe('when given a valid ipv4Address', () => {
382
+ it('creates a valid matcher', () => {
392
383
  (0, chai_1.expect)((0, matchers_1.ipv4Address)('127.0.0.1')).to.be.an('object');
393
384
  (0, chai_1.expect)((0, matchers_1.ipv4Address)()).to.be.an('object');
394
385
  });
395
386
  });
396
- describe('when given an invalid ipv4Address', function () {
397
- it('returns an error', function () {
398
- (0, chai_1.expect)(function () {
387
+ describe('when given an invalid ipv4Address', () => {
388
+ it('returns an error', () => {
389
+ (0, chai_1.expect)(() => {
399
390
  (0, matchers_1.ipv4Address)('abc');
400
391
  }).to.throw(Error);
401
392
  });
402
393
  });
403
394
  });
404
- describe('#ipv6Address', function () {
405
- describe('when given a valid ipv6Address', function () {
406
- it('creates a valid matcher', function () {
395
+ describe('#ipv6Address', () => {
396
+ describe('when given a valid ipv6Address', () => {
397
+ it('creates a valid matcher', () => {
407
398
  (0, chai_1.expect)((0, matchers_1.ipv6Address)('::1')).to.be.an('object');
408
399
  (0, chai_1.expect)((0, matchers_1.ipv6Address)('2001:0db8:85a3:0000:0000:8a2e:0370:7334')).to.be.an('object');
409
400
  (0, chai_1.expect)((0, matchers_1.ipv6Address)()).to.be.an('object');
410
401
  });
411
402
  });
412
- describe('when given an invalid ipv6Address', function () {
413
- it('returns an error', function () {
414
- (0, chai_1.expect)(function () {
403
+ describe('when given an invalid ipv6Address', () => {
404
+ it('returns an error', () => {
405
+ (0, chai_1.expect)(() => {
415
406
  (0, matchers_1.ipv6Address)('abc');
416
407
  }).to.throw(Error);
417
408
  });
418
409
  });
419
410
  });
420
- describe('#hexadecimal', function () {
421
- describe('when given a valid hexadecimal', function () {
422
- it('creates a valid matcher', function () {
411
+ describe('#hexadecimal', () => {
412
+ describe('when given a valid hexadecimal', () => {
413
+ it('creates a valid matcher', () => {
423
414
  (0, chai_1.expect)((0, matchers_1.hexadecimal)('6F')).to.be.an('object');
424
415
  (0, chai_1.expect)((0, matchers_1.hexadecimal)()).to.be.an('object');
425
416
  });
426
417
  });
427
- describe('when given an invalid hexadecimal', function () {
428
- it('returns an error', function () {
429
- (0, chai_1.expect)(function () {
418
+ describe('when given an invalid hexadecimal', () => {
419
+ it('returns an error', () => {
420
+ (0, chai_1.expect)(() => {
430
421
  (0, matchers_1.hexadecimal)('x1');
431
422
  }).to.throw(Error);
432
423
  });
433
424
  });
434
425
  });
435
- describe('#boolean', function () {
436
- describe('when used it should create a JSON object', function () {
437
- it('creates a valid matcher', function () {
426
+ describe('#boolean', () => {
427
+ describe('when used it should create a JSON object', () => {
428
+ it('creates a valid matcher', () => {
438
429
  (0, chai_1.expect)((0, matchers_1.boolean)()).to.be.an('object');
439
430
  (0, chai_1.expect)((0, matchers_1.boolean)().value).to.equal(true);
440
431
  });
441
- it('sets value=false', function () {
432
+ it('sets value=false', () => {
442
433
  (0, chai_1.expect)((0, matchers_1.boolean)(false)).to.be.an('object');
443
434
  (0, chai_1.expect)((0, matchers_1.boolean)(false).value).to.equal(false);
444
435
  });
445
- it('sets value=true', function () {
436
+ it('sets value=true', () => {
446
437
  (0, chai_1.expect)((0, matchers_1.boolean)(true)).to.be.an('object');
447
438
  (0, chai_1.expect)((0, matchers_1.boolean)(true).value).to.equal(true);
448
439
  });
449
440
  });
450
441
  });
451
- describe('#string', function () {
452
- describe('when given a valid string', function () {
453
- it('creates a valid matcher', function () {
442
+ describe('#string', () => {
443
+ describe('when given a valid string', () => {
444
+ it('creates a valid matcher', () => {
454
445
  (0, chai_1.expect)((0, matchers_1.string)('test')).to.be.an('object');
455
446
  (0, chai_1.expect)((0, matchers_1.string)()).to.be.an('object');
456
447
  (0, chai_1.expect)((0, matchers_1.string)('test').value).to.equal('test');
457
448
  });
458
449
  });
459
450
  });
460
- describe('#decimal', function () {
461
- describe('when given a valid decimal', function () {
462
- it('creates a valid matcher', function () {
451
+ describe('#decimal', () => {
452
+ describe('when given a valid decimal', () => {
453
+ it('creates a valid matcher', () => {
463
454
  (0, chai_1.expect)((0, matchers_1.decimal)(10.1)).to.be.an('object');
464
455
  (0, chai_1.expect)((0, matchers_1.decimal)()).to.be.an('object');
465
456
  (0, chai_1.expect)((0, matchers_1.decimal)(0.0).value).to.equal(0.0);
466
457
  });
467
458
  });
468
459
  });
469
- describe('#integer', function () {
470
- describe('when given a valid integer', function () {
471
- it('creates a valid matcher', function () {
460
+ describe('#integer', () => {
461
+ describe('when given a valid integer', () => {
462
+ it('creates a valid matcher', () => {
472
463
  (0, chai_1.expect)((0, matchers_1.integer)(10)).to.be.an('object');
473
464
  (0, chai_1.expect)((0, matchers_1.integer)()).to.be.an('object');
474
465
  (0, chai_1.expect)((0, matchers_1.integer)(0).value).to.equal(0);
475
466
  });
476
467
  });
477
468
  });
478
- describe('Date Matchers', function () {
479
- describe('#rfc1123Timestamp', function () {
480
- describe('when given a valid rfc1123Timestamp', function () {
481
- it('creates a valid matcher', function () {
469
+ describe('Date Matchers', () => {
470
+ describe('#rfc1123Timestamp', () => {
471
+ describe('when given a valid rfc1123Timestamp', () => {
472
+ it('creates a valid matcher', () => {
482
473
  (0, chai_1.expect)((0, matchers_1.rfc1123Timestamp)('Mon, 31 Oct 2016 15:21:41 -0400')).to.be.an('object');
483
474
  (0, chai_1.expect)((0, matchers_1.rfc1123Timestamp)()).to.be.an('object');
484
475
  });
485
476
  });
486
- describe('when given an invalid rfc1123Timestamp', function () {
487
- it('returns an error', function () {
488
- (0, chai_1.expect)(function () {
477
+ describe('when given an invalid rfc1123Timestamp', () => {
478
+ it('returns an error', () => {
479
+ (0, chai_1.expect)(() => {
489
480
  (0, matchers_1.rfc1123Timestamp)('abc');
490
481
  }).to.throw(Error);
491
482
  });
492
483
  });
493
484
  });
494
- describe('#iso8601Time', function () {
495
- describe('when given a valid iso8601Time', function () {
496
- it('creates a valid matcher', function () {
485
+ describe('#iso8601Time', () => {
486
+ describe('when given a valid iso8601Time', () => {
487
+ it('creates a valid matcher', () => {
497
488
  (0, chai_1.expect)((0, matchers_1.iso8601Time)('T22:44:30.652Z')).to.be.an('object');
498
489
  (0, chai_1.expect)((0, matchers_1.iso8601Time)()).to.be.an('object');
499
490
  });
500
491
  });
501
- describe('when given an invalid iso8601Time', function () {
502
- it('returns an error', function () {
503
- (0, chai_1.expect)(function () {
492
+ describe('when given an invalid iso8601Time', () => {
493
+ it('returns an error', () => {
494
+ (0, chai_1.expect)(() => {
504
495
  (0, matchers_1.iso8601Time)('abc');
505
496
  }).to.throw(Error);
506
497
  });
507
498
  });
508
499
  });
509
- describe('#iso8601Date', function () {
510
- describe('when given a valid iso8601Date', function () {
511
- it('creates a valid matcher', function () {
500
+ describe('#iso8601Date', () => {
501
+ describe('when given a valid iso8601Date', () => {
502
+ it('creates a valid matcher', () => {
512
503
  (0, chai_1.expect)((0, matchers_1.iso8601Date)('2017-12-05')).to.be.an('object');
513
504
  (0, chai_1.expect)((0, matchers_1.iso8601Date)()).to.be.an('object');
514
505
  });
515
506
  });
516
- describe('when given an invalid iso8601Date', function () {
517
- it('returns an error', function () {
518
- (0, chai_1.expect)(function () {
507
+ describe('when given an invalid iso8601Date', () => {
508
+ it('returns an error', () => {
509
+ (0, chai_1.expect)(() => {
519
510
  (0, matchers_1.iso8601Date)('abc');
520
511
  }).to.throw(Error);
521
512
  });
522
513
  });
523
514
  });
524
- describe('#iso8601DateTime', function () {
525
- describe('when given a valid iso8601DateTime', function () {
526
- it('creates a valid matcher', function () {
515
+ describe('#iso8601DateTime', () => {
516
+ describe('when given a valid iso8601DateTime', () => {
517
+ it('creates a valid matcher', () => {
527
518
  (0, chai_1.expect)((0, matchers_1.iso8601DateTime)('2015-08-06T16:53:10+01:00')).to.be.an('object');
528
519
  (0, chai_1.expect)((0, matchers_1.iso8601DateTime)()).to.be.an('object');
529
520
  });
530
521
  });
531
- describe('when given an invalid iso8601DateTime', function () {
532
- it('returns an error', function () {
533
- (0, chai_1.expect)(function () {
522
+ describe('when given an invalid iso8601DateTime', () => {
523
+ it('returns an error', () => {
524
+ (0, chai_1.expect)(() => {
534
525
  (0, matchers_1.iso8601DateTime)('abc');
535
526
  }).to.throw(Error);
536
527
  });
537
528
  });
538
529
  });
539
- describe('#iso8601DateTimeWithMillis', function () {
540
- describe('when given a valid iso8601DateTimeWithMillis', function () {
541
- it('creates a valid matcher', function () {
530
+ describe('#iso8601DateTimeWithMillis', () => {
531
+ describe('when given a valid iso8601DateTimeWithMillis', () => {
532
+ it('creates a valid matcher', () => {
542
533
  (0, chai_1.expect)((0, matchers_1.iso8601DateTimeWithMillis)('2015-08-06T16:53:10.123+01:00')).to.be.an('object');
543
534
  (0, chai_1.expect)((0, matchers_1.iso8601DateTimeWithMillis)('2015-08-06T16:53:10.537357Z')).to.be.an('object');
544
535
  (0, chai_1.expect)((0, matchers_1.iso8601DateTimeWithMillis)('2020-12-10T09:01:29.06Z')).to.be.an('object');
@@ -546,17 +537,17 @@ describe('Matcher', function () {
546
537
  (0, chai_1.expect)((0, matchers_1.iso8601DateTimeWithMillis)()).to.be.an('object');
547
538
  });
548
539
  });
549
- describe('when given an invalid iso8601DateTimeWithMillis', function () {
550
- it('returns an error', function () {
551
- (0, chai_1.expect)(function () {
540
+ describe('when given an invalid iso8601DateTimeWithMillis', () => {
541
+ it('returns an error', () => {
542
+ (0, chai_1.expect)(() => {
552
543
  (0, matchers_1.iso8601DateTimeWithMillis)('abc');
553
544
  }).to.throw(Error);
554
545
  });
555
546
  });
556
547
  });
557
- describe('#extractPayload', function () {
558
- describe('when given an object with no matchers', function () {
559
- var object = {
548
+ describe('#extractPayload', () => {
549
+ describe('when given an object with no matchers', () => {
550
+ const object = {
560
551
  some: 'data',
561
552
  more: 'strings',
562
553
  an: ['array'],
@@ -565,12 +556,12 @@ describe('Matcher', function () {
565
556
  withNumber: 1,
566
557
  },
567
558
  };
568
- it('returns just that object', function () {
559
+ it('returns just that object', () => {
569
560
  (0, chai_1.expect)((0, matchers_1.extractPayload)(object)).to.deep.equal(object);
570
561
  });
571
562
  });
572
- describe('when given an object with null values', function () {
573
- var object = {
563
+ describe('when given an object with null values', () => {
564
+ const object = {
574
565
  some: 'data',
575
566
  more: null,
576
567
  an: [null],
@@ -580,12 +571,12 @@ describe('Matcher', function () {
580
571
  andNull: null,
581
572
  },
582
573
  };
583
- it('returns just that object', function () {
574
+ it('returns just that object', () => {
584
575
  (0, chai_1.expect)((0, matchers_1.extractPayload)(object)).to.deep.equal(object);
585
576
  });
586
577
  });
587
- describe('when given an object with some matchers', function () {
588
- var someMatchers = {
578
+ describe('when given an object with some matchers', () => {
579
+ const someMatchers = {
589
580
  some: (0, matchers_1.somethingLike)('data'),
590
581
  more: 'strings',
591
582
  an: ['array'],
@@ -597,7 +588,7 @@ describe('Matcher', function () {
597
588
  withAnotherNumber: (0, matchers_1.somethingLike)(2),
598
589
  },
599
590
  };
600
- var expected = {
591
+ const expected = {
601
592
  some: 'data',
602
593
  more: 'strings',
603
594
  an: ['array'],
@@ -609,14 +600,14 @@ describe('Matcher', function () {
609
600
  withAnotherNumber: 2,
610
601
  },
611
602
  };
612
- it('returns without matching guff', function () {
603
+ it('returns without matching guff', () => {
613
604
  (0, chai_1.expect)((0, matchers_1.extractPayload)(someMatchers)).to.deep.equal(expected);
614
605
  });
615
606
  });
616
- describe('when given a simple matcher', function () {
617
- it('removes all matching guff', function () {
618
- var expected = 'myawesomeword';
619
- var matcher = (0, matchers_1.term)({
607
+ describe('when given a simple matcher', () => {
608
+ it('removes all matching guff', () => {
609
+ const expected = 'myawesomeword';
610
+ const matcher = (0, matchers_1.term)({
620
611
  generate: 'myawesomeword',
621
612
  matcher: '\\w+',
622
613
  });
@@ -624,9 +615,9 @@ describe('Matcher', function () {
624
615
  (0, chai_1.expect)((0, matchers_1.extractPayload)(matcher)).to.eql(expected);
625
616
  });
626
617
  });
627
- describe('when given a complex nested object with matchers', function () {
628
- it('removes all matching guff', function () {
629
- var o = (0, matchers_1.somethingLike)({
618
+ describe('when given a complex nested object with matchers', () => {
619
+ it('removes all matching guff', () => {
620
+ const o = (0, matchers_1.somethingLike)({
630
621
  stringMatcher: {
631
622
  awesomeSetting: (0, matchers_1.somethingLike)('a string'),
632
623
  },
@@ -646,7 +637,7 @@ describe('Matcher', function () {
646
637
  }, { min: 3 }),
647
638
  },
648
639
  });
649
- var expected = {
640
+ const expected = {
650
641
  stringMatcher: {
651
642
  awesomeSetting: 'a string',
652
643
  },