lunarmodules / busted

Elegant Lua unit testing.
https://lunarmodules.github.io/busted/
MIT License
1.4k stars 185 forks source link

Writing tests for Terra in Moonscripts fails #592

Open DarkWiiPlayer opened 5 years ago

DarkWiiPlayer commented 5 years ago

I've tried if this was possible, but it seems the moonscript parser is loaded as Terra code, which then fails because of using undeclared globals.

Tieske commented 5 years ago

What is this? a feature request, or a bug? please add appropriate details

DarkWiiPlayer commented 5 years ago

If it was suposed to work, then it's a bug. If it doesn't, then it's a feature request. Either way I think it would make sense for it to be possible, or at least give an appropriate error messages saying that you can't write tests for terra in moonscript.

Tieske commented 5 years ago

not familiar with either terra nor moonscript. But PR's are welcome! 😄

alerque commented 2 years ago

The upstream tests for moonscript itself are written in moon and run using busted. Do you mean that specifically testing terra using moonscript specs is a problem? But that it works for specs written in plain Lua?