Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
ember-sinon-qunit
Advanced tools
This addon integrates Sinon & Ember-QUnit via Ember-Sinon, as inspired by Sinon-QUnit.
Why not simply use Ember-Sinon? Two reasons:
Import Ember-Sinon-QUnit's test
method into your tests in place of Ember-QUnit's test. This creates a Sinon sandbox
around that test via Sinon's test
API. Then, you can access Sinon's spy
, stub
, mock
, and sandbox
methods
via this
within the test callback:
import { moduleFor } from 'ember-qunit';
import test from 'ember-sinon-qunit/test';
moduleFor('route:foo', 'Unit | Route | foo');
test('fooTransition action transitions to bar route', function (assert) {
const route = this.subject();
const stub = this.stub(route, 'transitionTo');
route.send('fooTransition');
assert.ok(stub.calledOnce, 'transitionTo was called once');
assert.ok(stub.calledWithExactly('bar'), 'bar was passed to transitionTo');
});
That's it! You can use this test
method in place of all Ember-QUnit tests if you want, without any
loss of functionality. Or, you can import them both into the same test to be used only when you need Sinon:
import { moduleFor, test } from 'ember-qunit';
import sinonTest from 'ember-sinon-qunit/test';
git clone
this repositorycd ember-sinon-qunit
npm install
bower install
ember test
ember test --server
FAQs
Sinon sandbox test integration for QUnit
The npm package ember-sinon-qunit receives a total of 15,744 weekly downloads. As such, ember-sinon-qunit popularity was classified as popular.
We found that ember-sinon-qunit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.