hacktest icon indicating copy to clipboard operation
hacktest copied to clipboard

A unit testing framework for Hack

Results hacktest issues
Sort by recently updated
recently updated
newest added

fixes #80 Fixes: - Write a unit test for providers with periods in the key

CLA Signed

``` Run vendor/bin/hacktest tests/*.hack 2 vendor/bin/hacktest tests/*.hack 3 shell: /bin/bash -e {0} 4 ...... 5 6 Summary: 6 test(s), 6 passed, 0 failed, 0 skipped, 0 error(s). 7 8 Fatal...

``` Fatal error: Uncaught exception 'OutOfBoundsException' with message 'Out of bounds vec access: invalid index 2' in /Users/fredemmott/code/user-documentation/vendor/hhvm/hacktest/src/HackTestCLI.hack:62 ```

If you have a /lot/ of async tests, it can look like it's stalled completely for several minutes - e.g. when running the tests for hhvm/user-documentation

this makes copy-pasting output much nicer

``` Fatal error: Uncaught exception 'Facebook\HackTest\InvalidTestMethodException' with message 'Only test methods and data providers can be public. Consider changing getCleanExamples to a private or protected method.' in /Users/fredemmott/code/hhast/vendor/hhvm/hacktest/src/Framework/HackTestCase.php:122 Stack trace:...

We probably want to run tests within a file sequentially (cc @BobertForever ?) - but we can probably run multiple files simultaneously. These are picked up by the DontAwaitInALoop linter...

enhancement

eg `abstract class MyTestCase extends HackTest {}`; `final class FooTest extends MyTestCase {}` Also should probably assert that test classes are abstract or final, ignoring any abstract ones

It would be good to include additional data, such as: - the test name - how it failed (e.g. exception) if it failed - percentage A few ways to represent...