Skip to content

Commit e1c3f29

Browse files
committed
fix: Change the "->" in interaction names to "returns"
1 parent 1a641db commit e1c3f29

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

packages/case-core/src/index.http.request.verification.misconfigured.spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ describe('Server verification', () => {
124124
verifier.verifyContract(
125125
{ stateHandlers },
126126
runJestTestExpectingErrors({
127-
'When Server is down, then an http "GET" request to "/health" without a body -> a (httpStatus 4XX | 5XX) response without a body':
127+
'When Server is down, then an http "GET" request to "/health" without a body returns a (httpStatus 4XX | 5XX) response without a body':
128128
CaseConfigurationError,
129-
'When Server is down, then an http "GET" request to "/health" without a body -> a (503) response with body an object shaped like {status: "down"}':
129+
'When Server is down, then an http "GET" request to "/health" without a body returns a (503) response with body an object shaped like {status: "down"}':
130130
CaseConfigurationError,
131131
}),
132132
);
@@ -165,13 +165,13 @@ describe('Server verification', () => {
165165
verifier.verifyContract(
166166
{ stateHandlers },
167167
runJestTestExpectingErrors({
168-
'When Server is up, then an http "GET" request to "/health" without a body with the following headers an object shaped like {accept: "application/json"} -> a (200) response with body an object shaped like {status: "up"}':
168+
'When Server is up, then an http "GET" request to "/health" without a body with the following headers an object shaped like {accept: "application/json"} returns a (200) response with body an object shaped like {status: "up"}':
169169
CaseConfigurationError,
170-
'When Server is up, then an http "GET" request to "/health" without a body -> a (200) response with body an object shaped like {status: <any string>}':
170+
'When Server is up, then an http "GET" request to "/health" without a body returns a (200) response with body an object shaped like {status: <any string>}':
171171
CaseConfigurationError,
172-
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body -> a (200) response with body an object shaped like {userId: \${userId}}`]:
172+
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body returns a (200) response with body an object shaped like {userId: \${userId}}`]:
173173
CaseConfigurationError,
174-
'When Server is up and No users exist, then an http "GET" request to "/users/123" without a body -> a (404) response without a body':
174+
'When Server is up and No users exist, then an http "GET" request to "/users/123" without a body returns a (404) response without a body':
175175
CaseConfigurationError,
176176
}),
177177
);
@@ -215,13 +215,13 @@ describe('Server verification', () => {
215215
verifier.verifyContract(
216216
{ stateHandlers },
217217
runJestTestExpectingErrors({
218-
'When Server is up, then an http "GET" request to "/health" without a body with the following headers an object shaped like {accept: "application/json"} -> a (200) response with body an object shaped like {status: "up"}':
218+
'When Server is up, then an http "GET" request to "/health" without a body with the following headers an object shaped like {accept: "application/json"} returns a (200) response with body an object shaped like {status: "up"}':
219219
CaseConfigurationError,
220-
'When Server is up, then an http "GET" request to "/health" without a body -> a (200) response with body an object shaped like {status: <any string>}':
220+
'When Server is up, then an http "GET" request to "/health" without a body returns a (200) response with body an object shaped like {status: <any string>}':
221221
CaseConfigurationError,
222-
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body -> a (200) response with body an object shaped like {userId: \${userId}}`]:
222+
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body returns a (200) response with body an object shaped like {userId: \${userId}}`]:
223223
CaseConfigurationError,
224-
'When Server is up and No users exist, then an http "GET" request to "/users/123" without a body -> a (404) response without a body':
224+
'When Server is up and No users exist, then an http "GET" request to "/users/123" without a body returns a (404) response without a body':
225225
CaseConfigurationError,
226226
}),
227227
);
@@ -259,7 +259,7 @@ describe('Server verification', () => {
259259
verifier.verifyContract(
260260
{ stateHandlers },
261261
runJestTestExpectingErrors({
262-
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body -> a (200) response with body an object shaped like {userId: \${userId}}`]:
262+
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body returns a (200) response with body an object shaped like {userId: \${userId}}`]:
263263
CaseConfigurationError,
264264
}),
265265
);
@@ -298,7 +298,7 @@ describe('Server verification', () => {
298298
verifier.verifyContract(
299299
{ stateHandlers },
300300
runJestTestExpectingErrors({
301-
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body -> a (200) response with body an object shaped like {userId: \${userId}}`]:
301+
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body returns a (200) response with body an object shaped like {userId: \${userId}}`]:
302302
CaseConfigurationError,
303303
}),
304304
);
@@ -375,7 +375,7 @@ describe('Server verification', () => {
375375
verifier.verifyContract(
376376
{ stateHandlers },
377377
runJestTestExpectingErrors({
378-
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body -> a (200) response with body an object shaped like {userId: \${userId}}`]:
378+
[`When Server is up and A user exists, then an http "GET" request to "/users/\${userId}" without a body returns a (200) response with body an object shaped like {userId: \${userId}}`]:
379379
CaseConfigurationError,
380380
}),
381381
);

packages/case-plugin-base/src/core/contract/examples.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const exampleToNames = (
4444
responseName,
4545
mockName: `${
4646
stateNames !== '' ? `When ${stateNames}, then ` : ''
47-
}${requestName} -> ${responseName}`,
47+
}${requestName} returns ${responseName}`,
4848
};
4949
};
5050

0 commit comments

Comments
 (0)