Sinon.JS Alternatives
Similar projects and alternatives to Sinon.JS
-
-
chai
BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
-
Appwrite
Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
-
mocha
☕️ simple, flexible, fun javascript test framework for node.js & the browser
-
-
proxyquire
🔮 Proxies nodejs require in order to allow overriding dependencies during testing.
-
-
WebdriverIO
Next-gen browser and mobile automation test framework for Node.js
-
Scout APM
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
-
-
-
Playwright
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
-
-
-
-
-
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
-
-
-
Sinon.JS reviews and mentions
-
How Do I Stub webpack's require.ensure?
My test setup is based on Mocha, Chai and Sinon.
-
How to mock localStorage in JavaScript unit tests?
I've been using Sinon.JS for most of my other javascript mocking and have found it is really great.
-
Unit Testing Essentials for Express API: A Step-by-Step Guide
Standalone test spies, stubs and mocks for JavaScript: Sinon
-
Wizard level tips for testing/QA JS browser code ? How do you ensure full coverage, generate test cases, etc ?
My team uses Vue.js. We use Karma/Mocha/Chai and Sinon and Vue Test Utils to test our Vue components. For E2E testing we use Webdriver.io, but have in the past used Selenium written in Kotlin, and also Cypress.
-
Dependency Injection in JavaScript: Write Testable Code Easily
Thanks to the magic of runtime reflection and the underlying dynamic nature of JavaScript, our testing framework will likely let us replace those components with hard-coded "mocks" on the fly. Jest, a popular JavaScript testing library, comes with this functionality baked in, and many other libraries provide it as well (such as SinonJS).
-
Creating a Chai like assertion library using proxies
Assertions on mock functions (compatible with sinonjs and tinyspy).
-
Dealing With Test Doubles
Fakes can be constructed without help from mocking frameworks such as Jest or Sinon. An example of a fake object in Typescript,
-
Advanced Roadmap for React.js developers
-Jest -React testing library -Enzyme -Sinon -Mocha -Chai -AVA -Tape
-
The React roadmap for beginners you never knew you needed.
Sinon
-
Stubbing MQTT.js library in Ember.js tests with Sinon.JS
After some experiments with the mock-socket library I realized that this tool was not anymore mantained and combining some searchs into the Sinon.JS documentation I found a way to stub the MQTT.js dependency faking the connect method.
-
Introduction to stubbing and test driven development
During a previous software engineering internship, I was working on a NodeJS backend and had to write integration tests. We used mocha and chai as our Javascript test framework. However, there were times where we used external systems such as firebase or other external APIs in our backend logic. To mock that we used SinonJS and essentially verify whether specific functions are called, whether errors are thrown as well as what they resolve to.
- O básico sobre testes unitários
-
Time to say goodbye - Enzyme.js
It'd be hard for me to imagine what would it be like back then to write tests if it wasn't for Enzyme. Even with Enzyme, it was noticeably harder than it is today, and I still vividly remember installing and configuring in my project Mocha, Chai, Sinon, and JSDOM, to get pretty much the same tooling that today a single library - Jest - provides out of the box, while adding numerous features on top of that.
-
Using Sinon, how can I stub the same dependency twice, so it returns a different value based on different input parameters?
Hi all. I'm writing a unit test, and trying to use the Sinon package to ensure a particular dependency returns a different value, based on different parameters it is passed. I'm trying to use the withArgsmethod (see here). But when I do so, I encounter a console error:
-
[unit test] How to properly mock element.appendChild in my unit test?
Hi all. I have a method which creates an HTML element and calls the appendChild method. I've now written a unit test for this method, and want to use the Sinon package to mock the call to appendChlid and count how many times it was called. But when I do that, Sinon reports it was called zero times, instead of one. How do I use Sinon to properly mock (spy) appendChild in this case? My code is below.
Stats
sinonjs/sinon is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.
Popular Comparisons
Are you hiring? Post a new remote job listing for free.