Displaying 1 to 20 from 48 results

sinon - Test spies, stubs and mocks for JavaScript.

  •    Javascript

Standalone and test framework agnostic JavaScript test spies, stubs and mocks (pronounced "sigh-non", named after Sinon, the warrior).or via sinon's browser builds available for download on the homepage. There are also npm based CDNs one can use.

proxyquire - 🔮 Proxies nodejs require in order to allow overriding dependencies during testing.

  •    Javascript

Proxies nodejs's require in order to make overriding dependencies during testing easy while staying totally unobtrusive. If you want to stub dependencies for your client side modules, try proxyquireify, a proxyquire for browserify v2 or proxyquire-universal to test in both Node and the browser.

mockery - Simplifying the use of mocks with Node.js

  •    Javascript

If you've tried working with mocks in Node.js, you've no doubt discovered that it's not so easy to get your mocks hooked up in the face of Node's module loading system. When your source-under-test pulls in its dependencies through require, you want your mocks provided, instead of the original module, to enable true unit testing of your code. This is exactly the problem Mockery is designed to solve. Mockery gives you a simple and easy to use API with which you can hook in your mocks without having to get your hands dirty with the require cache or other Node implementation details.

testdouble.js - A minimal test double library for TDD with JavaScript

  •    Javascript

Welcome! Are you writing JavaScript tests and in the market for a mocking library to fake out real things for you? testdouble.js is an opinionated, carefully-designed test double library maintained by, oddly enough, a software agency that's also named Test Double. If you practice test-driven development, testdouble.js was designed to promote terse, clear, and easy-to-understand tests. There's an awful lot to cover, so please take some time and enjoy our documentation, which is designed to show you how to make the most out of test doubles in your tests.




dyson - Node server for dynamic, fake JSON.

  •    Javascript

Node server for dynamic, fake JSON. When developing client-side applications, often either static JSON files, or an actual server, backend, datastore, or API, is used. Sometimes static files are too static, and sometimes an actual server is not available, not accessible, or too tedious to set up.

Kakapo.js - :bird: Next generation mocking framework in Javascript

  •    Javascript

Kakapo its a full featured http mocking library, he allows you to entirely replicate your backend logic in simple and declaritive way directly in the browser. This way you can easily prototype and develop the whole Application without backend and just deactivate Kakapo when you go production. In order to achieve that Kakapo gives you a set of utilities like Routing, Database, Response, Request and so on... Use the kakapo router to declare two custom routes and returning custom data.

node-mocks-http - Mock 'http' objects for testing Express routing functions

  •    Javascript

Mock 'http' objects for testing Express routing functions, but could be used for testing any Node.js web server applications that have code that requires mockups of the request and response objects. This project is available as a NPM package.

project-stub - Simple BEM project example

  •    Javascript

Project-stub is a template project repository used for BEM projects creation. It contains the minimal configuration files and folders you will need for quick start from scratch. Note: If your operating system is Windows, you must run the following commands in Git Bash with administrator rights. Make sure that you launch Git Bash as an administrator.


mock-require - Simple, intuitive mocking of Node.js modules.

  •    Javascript

mock-require is useful if you want to mock require statements in Node.js. I wrote it because I wanted something with a straight-forward API that would let me mock anything, from a single exported function to a standard library. The module you that you want to mock. This is the same string you would pass in if you wanted to require the module.

apimocker - node.js module to run a simple http server for mock service responses.

  •    Javascript

Then you can visit "http://localhost:7878/first" in your browser to see it work. The quiet and port options can also be set in the config.json file, and values from config.json will override values from the command line. After you get up and running, you should put your config.json and mock responses in a better location. It's not a good idea to keep them under the "node_modules" directory. Make sure another process is not already using the port you want. If you want port 80, you may need to use "sudo" on Mac OSX. Sometimes you only want some service endpoints to be mocked, but have other requests forwarded to real service endpoints. In this case, provide the proxy URL option on startup e.g. apimocker --proxy http://myrealservice.io When the proxy option is set, any requests to apimocker with URLs that are not configured with mock files, will be forwarded to the specified URL.

benv - Stub a browser environment in node.js and headlessly test your client-side code.

  •    Javascript

Stub a browser environment and test your client-side code in node.js.

mocha-wrap - Fluent pluggable interface for easily wrapping `describe` and `it` blocks in Mocha tests

  •    Javascript

Fluent pluggable interface for easily wrapping describe, context, it, and specify blocks in Mocha tests.A mocha-wrap plugin is a named function that returns a MochaWrapper instance or a descriptor object.

quick-stub - some personalized file stubbing tools

  •    Javascript

Some personalized scaffolding tools I am using to automate my workflow.This is an experiment / proof of concept. One day it may grow into a generalized tool for scaffolding modules, apps, components, etc. Feel free to fork or post issues if you want to discuss.

testdouble-chai - Chai assertions for testdouble.js

  •    Javascript

And you should be good to go! Check out test/testdouble-chai_test.js for an exhaustive description of how this library behaves.

proxyquireify - browserify >= v2 version of proxyquire

  •    Javascript

browserify >= v2 version of proxyquire. Proxies browserify's require in order to make overriding dependencies during testing easy while staying totally unobstrusive. To run your tests in both Node and the browser, use proxyquire-universal.

dorante - stub an API from a JSON schema

  •    Javascript

Dorante accepts a JSON schema and provides a stub API server based on it. Dorante will start a stub API server when you give it a JSON schema. You can then make requests to that server, and Dorante will do its best to act like a real version of the API that the schema represents.

smoking - Simple Mocking and Stubbing for javascript

  •    Javascript

Simple Mocks and Stubs for javascript. The idea is to provide simple mocking and stubbing to normal objects, no API, no dependencies.