This repository was archived by the owner on Feb 7, 2019. It is now read-only.
Open
Conversation
OmarTawfik
reviewed
Oct 27, 2018
| @@ -0,0 +1,8 @@ | |||
| import { LibraryTypeInstance, LibraryMethodInstance, LibraryPropertyInstance, LibraryEventInstance } from "../libraries"; | |||
Member
There was a problem hiding this comment.
Why are we adding this file?
Collaborator
Author
There was a problem hiding this comment.
It slipped through my notice. I'll amend my commit.
|
|
||
| const value = engine.memory.values["x"]; | ||
| expect(value.toValueString()).toMatch(/[0-9]{2}:[0-9]{2}:[0-9]{2}/); | ||
| expect(value.toValueString()).toMatch(/[0-9]{2}:[0-9]{2}:[0-9]{2} A|PM/); |
Member
There was a problem hiding this comment.
It appears that adding the AM/PM made the tests fail. Why did we do that?
Collaborator
Author
There was a problem hiding this comment.
Strange. On the contrary, tests were failing on my system without it. Maybe it depends on the locale? In that case we should manually construct the string?
Collaborator
Author
There was a problem hiding this comment.
We can easily reproduce this, just try:
LANG=en_US node -e 'console.log((new Date()).toLocaleString())'
028f56c to
fa5b649
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
have a look at the test regex. Would it better to get current time values and then compare?