Skip to content

Thirst v0.2.0

Latest

Choose a tag to compare

@rhysuki rhysuki released this 01 Mar 15:00
f4c2a17

Total rewrite, better syntax, 15 new assertions, actual documentation

What's New?

  • Rewrote the library from scratch! It's not a monkeypatch on top of Lust anymore.
  • New settings:
    • thirst.is_coverage_bar_enabled;
    • thirst.is_printing_enabled;
    • thirst.is_print_errors_on_finish_enabled.
  • New assertions:
    • expect.pass() and expect.fail();
    • expect.does_not_exist();
    • expect.not_equals();
    • expect.is_a() and expect.is_not_a();
    • expect.function_fails();
    • expect.contains() and expect.does_not_contain();
    • expect.is_empty() and expect.is_not_empty();
    • expect.greater_than(), expect.greater_than_or_equal_to(), expect.lesser_than() and expect.lesser_than_or_equal_to().
  • Now includes Lust's before(), after() and spy() functionalities.
  • run_folder() lets you execute your whole test suite at once (with LÖVE).
  • Now has unit tests.

Changes

  • Doesn't use to_fail() to invert tests anymore, as it was too confusing. Instead, most assertions will have an opposite version, like is_a() and is_not_a().
  • nocolor() has been replaced with is_color_enabled.
  • describe(), _push() and _pop() are now section(), push_section() and pop_section().
  • _new_assertion() has been replaced with create_assertion().

In The Future

  • expect.has_substring(), expect.match(), maybe expect.starts_with() and expect.ends_with().

All in all, that was over 1600 lines changed, with 1.2k additions and ~500 deletions. Whew!