# Haxe 4 and unit tests

**URL:** <https://community.haxe.org/t/haxe-4-and-unit-tests/2338>\
**Category:** Haxe\
**Created:** [April 7, 2020, 12:42am UTC](https://community.haxe.org/t/haxe-4-and-unit-tests/2338 "2020-04-07T00:42:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![w-keeper](https://avatars.discourse-cdn.com/v2/letter/w/c67d28/32.png) [@w-keeper](https://community.haxe.org/u/w-keeper)\
**Post date:** [April 7, 2020, 12:42am UTC](https://community.haxe.org/t/haxe-4-and-unit-tests/2338/1 "2020-04-07T00:42:34Z")

</div>

Hello,  
I used Haxe 3 to write an embedded module of server-side and client-side of my project. The stable version of this module was made about one year ago and I did no changes in that in a year. Today it was necessary to make some changes in it, I installed latest Haxe 4 and faced with not working unit tests. I’ve read that this library was deprecated in Haxe 4. So, what is the best practice of testing Haxe projects now? I need your advice.

Alex

---

<div class="post-metadata">

**Author:** ![RealyUniqueName](https://community.haxe.org/user_avatar/community.haxe.org/realyuniquename/32/10_2.png) [@RealyUniqueName](https://community.haxe.org/u/RealyUniqueName)\
**Post date:** [April 7, 2020, 7:05am UTC](https://community.haxe.org/t/haxe-4-and-unit-tests/2338/2 "2020-04-07T07:05:50Z")

</div>

`haxe.unit` package has been moved to [hx3compat library](https://lib.haxe.org/p/hx3compat/)  
As an alternative you can switch to [munit](https://lib.haxe.org/p/munit/), [tink\_unittest](https://lib.haxe.org/p/tink_unittest/) or [utest](https://lib.haxe.org/p/utest/)

---

<div class="post-metadata">

**Author:** ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)\
**Post date:** [April 7, 2020, 8:16am UTC](https://community.haxe.org/t/haxe-4-and-unit-tests/2338/3 "2020-04-07T08:16:13Z")

</div>

Also, no matter which one of those you end up using, if you’re using VSCode you should check out [Haxe Test Explorer](https://marketplace.visualstudio.com/items?itemName=vshaxe.haxe-test-adapter).

---

<div class="post-metadata">

**Author:** ![w-keeper](https://avatars.discourse-cdn.com/v2/letter/w/c67d28/32.png) [@w-keeper](https://community.haxe.org/u/w-keeper)\
**Post date:** [April 9, 2020, 11:45am UTC](https://community.haxe.org/t/haxe-4-and-unit-tests/2338/4 "2020-04-09T11:45:54Z")

</div>

Thank you, I’ll try those.
