ciscoheat / buddy

Your friendly BDD testing library for Haxe!
MIT License
96 stars 24 forks source link

Issues with Haxe 4 preview 5 #77

Closed hansagames closed 5 years ago

hansagames commented 5 years ago

Hi, noticed that in haxe 4 preview 5 there is issue with buddy tests. Maybe its too fast adoption but still.

var buddy_SpecStatus = $hxEnums["buddy.SpecStatus"] = { __ename__ : true, __constructs__ : ["Unknown","Passed","Pending","Failed"]

ReferenceError: $hxEnums is not defined
    at /build/test.nodejs.js:386:24
    at Object.<anonymous> (/build/test.nodejs.js:3254:3)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Function.Module.runMain (module.js:703:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:660:3
Error: Command failed with error 1

test script

## JavaScript
--next
-main TestMain
-lib buddy
-lib tink_state
-cp src
-cp test
-js build/test.nodejs.js
-D nodejs
-D buddy-colors
-cmd echo "---------- Node.js ----------"
-cmd node build/test.nodejs.js
kLabz commented 5 years ago

Buddy is not the only lib impacted, haxe 4 preview 5 is problematic in this regard. The change on hxEnum has since been reverted in haxe 4 dev.

I don't know if buddy could/will find a way to make it work for preview 5, but it could be a good idea to skip preview 5 and wait for preview 6.

hansagames commented 5 years ago

@kLabz thanks for the info, will revert back to preview 4 as I am finding a lot of errors for different libs with preview 5

ciscoheat commented 5 years ago

This should be fixed in one of the 4.0 RC versions.