For testing my backend apps, I’m using Tink UnitTest. For my frontend apps, I also want to use Tink UnitTest, but I don’t know how to do, so currently I’m using the combination Karma + Mocha + UTest.
Does anyone know how to use Tink UnitTest for browser testing? Or, at least, does anyone know how to turn test failures into exceptions under Tink UnitTest ?
Hmm. I do use tink_unittest for some browser testing (although for libraries as opposed to applications), so in essence it’s fair to say "it works for me"™. For running in the browser, the tests are run through travix, which runs them on node+puppeteer, i.e. directly in chromium (as opposed to a web driver).
Could you perhaps provide a sample test, representative of the things you struggle to port?
@kevinresol I don’t have any issue using Tink UnitTest/TestRunner in itself. What I’m trying to achieve is the same kind of functionality than Karma: automate browser testing and have a report of failures/successes on the command line, and a proper exit code (like what is already done when using the test runner on the CLI). @back2dos I’ll take a look at travix code for inspiration.
PS: thank you to both of you for your amazing work on Coconut/Tinkerbell and other Haxe libs
Two small changes: I’m using Playwright instead of Puppeteer (because it supports more browsers and has nearly the same API), and I needed to force the use of the AnsiFormatter (because otherwise I lose the output colorization).