Git Product home page Git Product logo

rescript-zora's People

Contributors

dusty-phillips avatar freddiegilbraith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rescript-zora's Issues

add assertions with no description

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.

not running my rescript tests when I add other non-rescript tests

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?

Shouldn't test return a promise?

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 tests 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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.