All Projects → stroiman → respect

stroiman / respect

Licence: other
RSpec inspired test framework for Reason/OCaml/Bucklescript.

Programming Languages

reason
219 projects
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to respect

chai-exclude
Exclude keys to compare from a deep equal operation with chai expect or assert.
Stars: ✭ 33 (+17.86%)
Mutual labels:  unit-testing, tdd, bdd
Jasmine Matchers
Write Beautiful Specs with Custom Matchers for Jest and Jasmine
Stars: ✭ 552 (+1871.43%)
Mutual labels:  unit-testing, tdd, bdd
Ut
UT: C++20 μ(micro)/Unit Testing Framework
Stars: ✭ 507 (+1710.71%)
Mutual labels:  unit-testing, tdd, bdd
mocha-cakes-2
A BDD plugin for Mocha testing framework
Stars: ✭ 44 (+57.14%)
Mutual labels:  tdd, bdd
utest
Lightweight unit testing framework for C/C++ projects. Suitable for embedded devices.
Stars: ✭ 18 (-35.71%)
Mutual labels:  unit-testing, tdd
bdd-for-all
Flexible and easy to use library to enable your behavorial driven development (BDD) teams to easily collaborate while promoting automation, transparency and reporting.
Stars: ✭ 42 (+50%)
Mutual labels:  tdd, bdd
SimplyVBUnit
The SimplyVBUnit framework provides powerful unit-testing capabilities for VB6.
Stars: ✭ 28 (+0%)
Mutual labels:  unit-testing, tdd
book-fullstack-react-with-typescript
Working through the code samples from Fullstack React with Typescript by Maksim Ivanov and Alex Bespoyasov
Stars: ✭ 52 (+85.71%)
Mutual labels:  unit-testing, tdd
tdd roman csharp
Kata: TDD Arabic to Roman Numerals with C#
Stars: ✭ 14 (-50%)
Mutual labels:  unit-testing, tdd
automock
A library for testing classes with auto mocking capabilities using jest-mock-extended
Stars: ✭ 26 (-7.14%)
Mutual labels:  unit-testing, tdd
showroom
Universal development and automated test environment for web components
Stars: ✭ 89 (+217.86%)
Mutual labels:  tdd, bdd
cucumber
Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.
Stars: ✭ 322 (+1050%)
Mutual labels:  tdd, bdd
tddd-starter
Laravel TDDD Starter App
Stars: ✭ 23 (-17.86%)
Mutual labels:  tdd, bdd
doctest
The fastest feature-rich C++11/14/17/20 single-header testing framework
Stars: ✭ 4,434 (+15735.71%)
Mutual labels:  unit-testing, tdd
ginkgo4j
A Java BDD Testing Framework (based on RSpec and Ginkgo)
Stars: ✭ 25 (-10.71%)
Mutual labels:  tdd, bdd
kmtest
Kernel-mode C++ unit testing framework in BDD-style
Stars: ✭ 42 (+50%)
Mutual labels:  unit-testing, bdd
oletus
Minimal ECMAScript Module test runner
Stars: ✭ 43 (+53.57%)
Mutual labels:  unit-testing, tdd
bdd-for-c
A simple BDD library for the C language
Stars: ✭ 90 (+221.43%)
Mutual labels:  tdd, bdd
Alsatian
TypeScript testing framework with test cases
Stars: ✭ 244 (+771.43%)
Mutual labels:  unit-testing, tdd
chai
BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
Stars: ✭ 7,842 (+27907.14%)
Mutual labels:  tdd, bdd

ReSpect

BDD-style test framework for Reason/bucklescript

Attention - The NPM package has moved to @stroiman/respect. Remember to update both package.json AND bsconfig.json.

The source repo was moved from to https://github.com/stroiman/respect.git

Build Status

This is an RSpec inspired test framework for ReasonML/OCaml/Bucklescript. The runner uses raw javascript code, so it will only run in node environments at the moment.

I base this on a lot of experience I gained from a similar project for F#, FSpec.

This project is still in a very early stage, so use at your own risk. Breaking changes occur from time to time.

Features

  • The framework places tests in "examples", which are grouped in "example groups", just like mocha, jest, jasmine, etc.
  • Example groups and their examples are build using immutable data structures, allowing for metaprogramming to modify/generate the examples.
  • Support for testing async code.
  • The framework provides a context object that is unique to each individual test case, and provides a place where each test case can store state necessary for that case.
  • Each example or group can have metadata atteched that will be made available through the context object. This can be used modify what happens in the setup code.

Getting Started

Run npm install --save-dev @stroiman/respect and add @stroiman/respect to the bs-dev-dependencies in bsconfig.json.

open Respect.Dsl.Sync;

describe "My first test" [
  it "should be a failing test" (fun _ => {
    1 |> should (equal (2))
  })
] |> register

Add a test script to package.json:

"scripts": {
   ...
   "test": "respect"
}

Build the code and run the tests with: npm run test

For more info, including tips on test watcher functionality, see the full Documentation

TODO

  • "Finalize" DSL for building test suites.
  • Determine whether or not to allow mutation of TestContext. This worked well in F#/FSpec, but we don't have runtime type checking in Reason/Bucklescript.
  • Finalize assertion framework.
  • Nicer test output when running.
  • Nicer test output when assertions fail.
  • Internally, figure out how to report progresss.
  • More flexible runner, e.g. configurable location of test files
  • ✓ Handle async timeout to avoid hanging when async tests don't call back
  • Make timeout configurable through example metadata.
  • Support tear-down code

Although, I had learned from many mistakes when building FSpec, there are some problems that demand different solutions in Reason/Bucklescript. Async support in particular.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].