mock-browser - A mock browser with window, document, location, navigation, local and session storage to use for client side code tests in a node environment

  •        31

A mock browser with window, document, location, navigation, local and session storage to use for client side code tests in a node environment. A majority of the implementation is from the jsdom project with enhancements for local and session storage plus some fixes for un-implemented document features (classList). The mock browser eliminates the need for a headless browser like phantomjs to provide a much faster unit test framework. It's perfect for browserify projects that run tests prior to compiling the bundle.

https://github.com/darrylwest/mock-browser

Dependencies:

jsdom : ^9.12.0
lodash : ^4.5

Tags
Implementation
License
Platform

   




Related Projects

chai - BDD / TDD assertion framework for node

  •    Javascript

Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework. For more information or to download plugins, view the documentation.

Pester - Pester is the ubiquitous test and mock framework for PowerShell.

  •    PowerShell

Pester is the ubiquitous test and mock framework for PowerShell. This code example lies a tiny bit, find it annotated and production ready here.

crypt.io - Encryption enabled browser storage

  •    Javascript

crypt.io implements secures browser storage with the SJCL (Stanford Javascript Crypto Libraries) crypto library. Here are a few examples of use to get you started.

GoConvey - Go testing in the browser. Integrates with go test. Write behavioral tests in Go.

  •    Go

GoConvey is a yummy Go testing tool for gophers. Works with go test. Use it in the terminal or browser according to your viewing pleasure.

localStorageDB - A simple database layer for localStorage and sessionStorage for creating structured data in the form of databases and tables

  •    Javascript

localStorageDB is a simple layer over localStorage (and sessionStorage) that provides a set of functions to store structured data like databases and tables. It provides basic insert/update/delete/query capabilities. localStorageDB has no dependencies, and is not based on WebSQL. Underneath it all, the structured data is stored as serialized JSON in localStorage or sessionStorage. Browsers need to support "Local Storage" in order to make localeStorageDB working.


store - A better way to use localStorage and sessionStorage

  •    Javascript

A feature-filled and friendly way to take advantage of localStorage and sessionStorage (JSON, namespacing, extensions, etc). Passing in false for the optional overwrite parameters will cause set actions to be skipped if the storage already has a value for that key. All set action methods return the previous value for that key, by default. If overwrite is false and there is a previous value, the unused new value will be returned.

locache - JavaScript caching framework for client side caching in the browser using localStorage - gracefully degrades when the browser doesn't support localStorage

  •    Javascript

JavaScript framework for client side caching in the browser using DOM Storage with expiring values. With a memcache inspired API usage is very simple. Locache has no dependencies and is very small. locache gracefully degrades when the browser doesn't support localStorage. Usually this will be IE6 or IE7, you wont get any errors, but caching attempts will be silently dropped and lookups will always appear to be a cache miss.

karate - Test Automation Made Simple

  •    Java

Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into a single, unified framework. The BDD syntax popularized by Cucumber is language-neutral, and easy for even non-programmers. Powerful JSON & XML assertions are built-in, and you can run tests in parallel for speed.

electron-mocha - Run Mocha tests in Electron

  •    Javascript

and then electron will be added to your path. Or, you can download a version from https://github.com/atom/electron/releases and then set an environment variable ELECTRON_PATH pointing to the binary. Note if you're using Mac OS X, the path would be to the actual executable and not the app directory e.g. /Applications/Electron.app/Contents/MacOS/Electron.You should probably just install electron-prebuilt as it simplifies things.

mocha - ☕️ simple, flexible, fun javascript test framework for node.js & the browser

  •    Javascript

Become a backer and show your support to our open source project. Does your company use Mocha? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time for maintenance and new features for everyone. Also, your company's logo will show on GitHub and on our site - who doesn't want a little extra exposure? Here's the info.

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.

shellspec - A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells

  •    Shell

ShellSpec is a full-featured BDD unit testing framework for dash, bash, ksh, zsh and all POSIX shells that provides first-class features such as code coverage, mocking, parameterized test, parallel execution and more. It was developed as a dev/test tool for cross-platform shell scripts and shell script libraries. ShellSpec is a new modern testing framework released in 2019, but it's already stable enough. With lots of practical CLI features and simple yet powerful syntax, it provides you with a fun shell script test environment. Version 0.28.0 has a lot of enhancements in the CLI. It is basically compatible, but there are some changes that you need to be aware of. See Migration Guide to Version 0.28.0 for details.

Mock Service Worker - Seamless REST/GraphQL API mocking library for browser and Node

  •    Javascript

Mock by intercepting requests on the network level. Seamlessly reuse the same mock definition for testing, development, and debugging. Browser usage is what sets Mock Service Worker apart from other tools. Utilizing the Service Worker API that intercepts requests for the purpose of caching, Mock Service Worker responds to captured requests with your mock definition on the network level. This way your application knows nothing about the mocking.

HTTPretty - HTTP client mocking tool for Python, it's like ruby's FakeWeb for python

  •    Python

Due to big API incompatibility between python 3.3, 3.4 and 3.5, the author of HTTPretty is not supporting python3 officially. You will notice that the travis build for python 3 might be broken, and while pull requests fixing py3 support are most welcome, it is still not official at least for now. Since you are interested in HTTPretty you should also be interested in speeding up your build. Replace pip with curdling and see your build running a lot faster.

store.js - Cross-browser storage for all use cases, used across the web.

  •    Javascript

A localStorage wrapper for all browsers without using cookies or flash. Uses localStorage, globalStorage, and userData behavior under the hood

fluentspec

  •    

the mock framework with a BDD flavor

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.

pollyjs - Record, Replay, and Stub HTTP Interactions.

  •    Javascript

Polly.JS is a standalone, framework-agnostic JavaScript library that enables recording, replaying, and stubbing HTTP interactions. Polly taps into native browser APIs to mock requests and responses with little to no configuration while giving you the ability to take full control of each request with a simple, powerful, and intuitive API.

Codeception - Full-stack testing PHP framework

  •    PHP

Codeception is a modern full-stack testing framework for PHP. Inspired by BDD, it provides an absolutely new way of writing acceptance, functional and even unit tests. Powered by PHPUnit. Codeception provides high-level domain language for tests. Tests are represented as a set of user's actions. Tests can be executed using Firefox, Chrome, Safari or Cloud Testing services with Selenium WebDriver. Browser can be emulated with HTTP-requests through CURL with PhpBrowser.

chai

  •    Javascript

BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.