8000 fix(js): an issue with loose equality for helpers; add missing tests for some helpers #53 #54 by yesudeep · Pull Request #55 · google/dotprompt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(js): an issue with loose equality for helpers; add missing tests for some helpers #53 #54 #55

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

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

yesudeep
Copy link
Collaborator

fix(js): an issue with loose equality for helpers; add missing tests for some helpers #53 #54

RATIONALE:

Loose equality as espoused by JavaScript's coercive operators, e.g. == will not translate to Python and Go. Since these tests expect cross-runtime behavior to be consistent, we also ensure that they are type-safe across language runtimes.

ISSUES:

CHANGELOG:

  • Add YAML spec tests for these helpers:
    • history
    • ifEquals
    • section
    • unlessEquals
  • Strict equality for ifEquals and unlessEquals
  • Add commentary explaining each test to help understanding
  • Update the Git hooks to run JS tests.

…for some helpers #53 #54

RATIONALE:

Loose equality as espoused by JavaScript's coercive operators, e.g. `==`
will not translate to Python and Go. Since these tests expect
cross-runtime behavior to be consistent, we also ensure that they are
type-safe across language runtimes.

ISSUES:
- [x] #53 (strict equality)
- [x] #54 (missing helpers)

CHANGELOG:

- [x] Add YAML spec tests for these helpers:
  - [x] history
  - [x] ifEquals
  - [x] section
  - [x] unlessEquals
- [x] Strict equality for ifEquals and unlessEquals
- [x] Add commentary explaining each test to help understanding
- [x] Update the Git hooks to run JS tests.
@yesudeep
Copy link
Collaborator Author

I'm also wondering whether there needs to be some way to filter certain tests based on the runtime.

@yesudeep yesudeep merged commit f645628 into main Feb 19, 2025
11 checks passed
@yesudeep yesudeep deleted the yesudeep/fix/eminent-shade branch February 19, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants
0