Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for escape utility functions #3742

Merged
merged 12 commits into from Mar 22, 2020
Merged

Conversation

kabirbaidhya
Copy link
Contributor

@kabirbaidhya kabirbaidhya commented Mar 21, 2020

Follow up PR from #3568.

  • Add tests for the main escape creator function makeEscape covering various cases both with default and custom config.
  • Add tests for dateToString utility function to cover various it's logical cases
  • Fix a potential issue by adding a default argument - that would show up if just the date is passed:
    TypeError: Cannot read property 'timeZone' of undefined
    

Test Cases
image

@kabirbaidhya kabirbaidhya changed the title Add unit tests for dateToString utility function Add unit tests for escape utility functions Mar 21, 2020
@kibertoad
Copy link
Collaborator

Thanks a lot!

@kibertoad kibertoad merged commit 078b749 into knex:master Mar 22, 2020
@kabirbaidhya kabirbaidhya deleted the tests branch March 22, 2020 20:33
kibertoad pushed a commit that referenced this pull request Mar 22, 2020
kibertoad added a commit that referenced this pull request Mar 22, 2020
* Typescript: Makes the ChainableInterface conform to Promise<T> (#3724)

(cherry picked from commit 998c92c)

* Add unit tests for escape utility functions (#3742)

(cherry picked from commit 078b749)

* Make protocol length check more defensive (#3744)

(cherry picked from commit e552fbd)

Co-authored-by: Florent Vilmart <364568+flovilmart@users.noreply.github.com>
Co-authored-by: Kabir Baidhya <kabirbaidhya@gmail.com>
@kibertoad
Copy link
Collaborator

Released in 0.20.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants