ember-sinon-qunit
testdouble.js (AKA td.js)
ember-sinon-qunit | testdouble.js (AKA td.js) | |
---|---|---|
2 | 4 | |
55 | 1,407 | |
- | 0.2% | |
9.5 | 6.5 | |
13 days ago | about 1 month ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ember-sinon-qunit
-
Good assertion messages with EmberJS + sinon
For sinon in your EmberJS project, you will probably want to install ember-sinon-qunit. This will also automatically pull in ember-sinon for you.
-
Why Blueprints in Ember Are Cool and How They Save You Time Writing Tests
In this example, we want to ensure that in each new acceptance test file generated in the future, an additional helper util from our project is imported, that ember-sinon-qunit is setup correctly and - most importantly - that our module description sparkles ✨:
testdouble.js (AKA td.js)
-
Cannot figure out how to mock ES6 modules for a Node AWS Lambda
ESM modules need custom loaders for mocking. Testsouble (https://www.npmjs.com/package/testdouble) was one of the first frameworks to support it AFAIK and a great type-safe option.
-
TypeScript testing
Alternative is using testdouble with `td.object()` https://www.npmjs.com/package/testdouble
-
Testing Without Mocks
I’m not sure I manage to follow the author correctly, but to me it seems that by “mock” they strictly refer to external mocking libraries, in the sense of JS’s `testdouble` [1] or Java’s `Mockito` [2]. The fake object as returned by `LoginClient.createNull().getUserInfo(...)` appears to be a “Nullable” for them.
[1] https://www.npmjs.com/package/testdouble
-
What you need to know about ES modules in Node.js
If you need an alternative for mocking, testdouble.js has full ES module support thanks to some excellent work by Gil Tayar.
What are some alternatives?
Sinon.JS - Test spies, stubs and mocks for JavaScript.
jest - Delightful JavaScript Testing.
react-text-mask - Input mask for React, Angular, Ember, Vue, & plain JavaScript
tape - tap-producing test harness for node and browsers
rfcs - RFCs for changes to Ember
loadtest - Runs a load test on the selected URL. Fast and easy to use. Can be integrated in your own workflow using the API.
Ember.js - Ember.js - A JavaScript framework for creating ambitious web applications
Cucumber.js - Cucumber for JavaScript
Ghost - Independent technology for modern publishing, memberships, subscriptions and newsletters.
nyc - the Istanbul command line interface
mocha - ☕️ simple, flexible, fun javascript test framework for node.js & the browser