Giter Site home page Giter Site logo

sinonjs / referee-custom-assertions Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 1.0 1.28 MB

Runnable examples of using referee custom assertions

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%
assertions testing mocha jasmine tap jest referee custom-assertions

referee-custom-assertions's Introduction

Custom assertions with @sinonjs/referee

This repository contains runnable examples of custom assertions for @sinonjs/referee.

The npm scripts in package.json show how to load custom assertions with

  • Mocha (npm run test:mocha)
  • Mochify (npm run test:mochify)
  • Jest (npm run test:jest)
  • Jasmine (npm run test:jasmine)
  • Tap (npm run test:tap)

The example sources can be found in ./test/assertions/. Use them as a blueprint to build your own assertions, or refer to the documentation of referee.add() to learn more.

referee-custom-assertions's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar mantoni avatar mroderick avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mroderick

referee-custom-assertions's Issues

A few thoughts

The reason I'm adding another example in #1: It wasn't compleltey trivial to write a custom assertion, even though I contributed an assertions to referee myself. It's one of those things however, that can be done very easily if there are a few examples that can be used as a template.

So I thought it would be nice to have a repository that collects custom assertions for others to "steal". Any assertions that we find useful, but don't really belong in core could be added here.

Maybe we should rename the repository to something more general, not Mocha specific. People can contribute other ways to add custom assertions to their test runners and we can use this repo as a playground or integration test for these scenarios.

Any ideas for names? Just drop -with-mocha?

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.