Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
``` ⧐ type('{}'.json()) HASH ⧐ type('[]'.json()) ARRAY ⧐ type('"hello"'.json()) STRING ⧐ type('1'.json()) NUMBER ``` In this PR I had to revert some of the changes we made in the tests earlier on. Using `strings.Contains` in the tests is very dangerous, and I reverted back to equality for most tests -- with the exception of the tests that check for error messages that use `strings.HasPrefix` which should be a bit more robust. The problem with `strings.Contains` is that is a tests expects a string (`"hello"`) and instead an error is thrown (`"Unable to call function: hello"`) the test will silently pass since it finds our expected string inside the error message. With `strings.HasPrefix` we limit these cases considerably. The end goal would be to make sure we can actually differentiate when ABS returns a string and an error string, but for now this is something we can work with.
- Loading branch information
Showing
4 changed files
with
68 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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