We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 500b067 commit ff6609aCopy full SHA for ff6609a
1 file changed
features/support/support.js
@@ -138,9 +138,12 @@ Then(
138
/the response should have a property ([a-zA-Z]*) with value (.*)/,
139
(propName, propValue) => {
140
const value = apiResponse.data[propName];
141
- const formattedValue =
142
- value instanceof Date ? value.toISOString() : value.toString();
143
- assert.equal(formattedValue, propValue);
+ if (value instanceof Date) {
+ // JS/TS does not differentiate date/date-time. Need to construct prop date and compare.
+ assert.equal(value.toISOString(), new Date(propValue).toISOString());
144
+ } else {
145
+ assert.equal(value.toString(), propValue);
146
+ }
147
}
148
);
149
0 commit comments