Skip to content

Commit

Permalink
expose expect function as well
Browse files Browse the repository at this point in the history
Summary:
Currently you can use almost all functions via the exported `expects` struct. Though `expect` is not available. This would be nice to have as it makes writing expectations for custom checks a bit nicer when you're already using expects.

We can name is `expects.true` as well, or anything else that you'd recommend. For now I've named it `expects.expect`.

Reviewed By: IanChilds

Differential Revision: D68328897

fbshipit-source-id: ca01f1edd3107d03c77bc60619dcd181b79e70ec
  • Loading branch information
AndreasBackx authored and facebook-github-bot committed Jan 17, 2025
1 parent 7c2931f commit a90344f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions prelude/utils/expect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def expect_struct(name: str, val: struct):

# You'll likely want to import this struct for convenience, instead of each method separately
expects = struct(
expect = expect,
type = expect_type,
string = expect_string,
string_starts_with = expect_string_starts_with,
Expand Down

0 comments on commit a90344f

Please sign in to comment.