dusty-phillips / rescript-zora Goto Github PK
View Code? Open in Web Editor NEWLightning-fast testing for a lightning-fast compiler
License: MIT License
Lightning-fast testing for a lightning-fast compiler
License: MIT License
Thanks for creating the bindings for Zora, it's quite a nice testing suite for rescript!
Sometimes you don't want to write a test message for an assertion, would you be open to a PR that would change the current API to make the test message optional?
It would be a lightweight layer like this:
let equal = (~msg=?, t, act, exp) => equal(t, act, exp, msg)
You would use it like that:
t->equal("foo", "foo")
// or if you do want a description
t->equal("foo", "foo", ~msg="those two strings should be the same")
Sure it adds a some runtime, but it'd be likely unnoticeable, especially for testing and it would sometimes help to make sure you're not feeding the text message with the expected string value.
Discussion here: test and update
Trying to figure out why exposing Promise.catch
in the rescript-zora
library or even calling Promise.catch
in my own code gives that es6 module error.
When I just run one test it works fine
I run the tests like this "test": "pta 'tests/*.test.mjs'",
tests/
- utils.test.res # generates utils.test.mjs and runs tests ok
but when I add normal test files to the mix, Zora only runs the non-rescript
tests/
- utils.test.res # generates utils.test.mjs and but is not run by Zora
- api-utils.test.mjs # run by zora
- other-utils.test.mjs # run by zora
Any idea what might I been missing?
Right now test is modeled like this:
@send external test: (t, testTitle, zoraTest) => unit = "test"
Shouldn't it be modeled like this instead:
@send external test: (t, testTitle, zoraTest) => Js.Promise.t<unit> = "test"
Otherwise you can write multiple test
s in a Zora block, finish with a done()
and get an error:
tried to collect an assertion after it has run to its completion.
You might have forgotten to wait for an asynchronous task to complete
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.