Created issue_589 spec file and yaml #590
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#589
This does not contain the fix yet, just a unit test to replicate the problem. In other words, the test should fail for now until the bug has been fixed.
The problem should be in this line but I wasn't able to replicate the problem in the project as I did in the distributed npm module (see #589 original post Examples and context).
I just created a simple test before trying to fix the bug and the result is this:
(Please note I'm in a Windows environment and I use
npm run test:windows)1) DateFormats should get the correct date: AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected + '1996-01-03T22:00:00.000Z' - '1996-01-04' ^ + expected - actual -1996-01-03T22:00:00.000Z +1996-01-04 at A:\NodeProjects\express-openapi-validator\test\issue_589.spec.ts:32:16 at processTicksAndRejections (internal/process/task_queues.js:93:5)The +actual in the assertion should be 1996-01-03 (this is what I get while using the published npm version) and not 1996-01-03T22:00:00.000Z
Even if I completely change the behavior of this line the test result would still be the same which is weird.
Maybe it's not this line that causes the problem?
Suggested Fix: