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

Change stubs to throw exceptions if used incorrectly #207

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NoahTheDuke
Copy link

Closes #206

Implements the bad-usage macro as described in #206.

I've opened this as a draft because for some reason, I can't get the clojurescript half of this to work. Running the tests with bb test:node shows these errors, making me doubt that the tests are running correctly:

[:cli-test] Build completed. (76 files, 3 compiled, 6 warnings, 4.25s)

------ WARNING #1 - :undeclared-var --------------------------------------------
 File: /home/noah/personal/matcher-combinators/test/cljs/matcher_combinators/cljs_example_test.cljs:60:16
--------------------------------------------------------------------------------
  57 | 
  58 | (deftest bad-usage-test
  59 |   (is (thrown? js/Error
  60 |                (match? :expected :actual)))
----------------------^---------------------------------------------------------
 Use of undeclared Var matcher-combinators.cljs-example-test/java
--------------------------------------------------------------------------------
...

I don't see see how what I wrote is any different than what's in clojure-expectations, so I'm pretty confused.

@NoahTheDuke
Copy link
Author

I've poked at this some more and I have no idea why there's an "undeclared-var" warning happening.

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.

Bad usage stubs for match? and thrown-match?
1 participant