
Product
Introducing Socket MCP for Claude Desktop
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
ember-js-mock
Advanced tools
Ember addon to make JsMock available as an import in your tests. JsMock is a simple mocking test framework, which can be used with any test framework. It is inspired by jMock and Sinon.js with its interface being very similar to Sinon in order to make it easy to switch between those two frameworks.
ember-js-mock
was inspired by ember-sinon.
Install JsMock in your ember application using the latest Ember CLI:
$ ember install ember-js-mock
Note: ember-js-mock
currently depends on ember-js-hamcrest
to installed as well. This may change in the future, but for now, please run the following install command as well.
$ ember install ember-jshamcrest
In order to use JsMock in your tests, simply import it in your test file.
import { module, test } from 'qunit';
import JsMock from 'js-mock';
// Declare your mock only once, there is no need to copy & paste t
// his code into every test case.
var testMock;
module('Acceptance | js mock', {
beforeEach: function () {
JsMock.watch(function () {
testMock = JsMock.mock("test");
});
},
afterEach: function() {
// Ensure that all expectations are fulfilled after each test case.
JsMock.assertWatched();
}
});
test('verify js-mock is available', function(assert) {
testMock.once();
testMock();
// If there is no other assertion needed in the test method
// then simply use `assertIfSatisfied()`.
assert.ok(JsMock.assertWatched());
});
The full API documentation for JsMock can be found here.
BSD 3-clause, see License.md
Due to a number of NPM packaging issues (see https://github.com/npm/npm/issues/5082), the majority of the previous packages have had issues. Consequently, I am considering version 0.6.1 to be the initial release.
Major release versions will be synchronized between ember-js-mock
and js-mock
.
FAQs
Ember CLI addon for JsMock (http://jsmock.org)
The npm package ember-js-mock receives a total of 0 weekly downloads. As such, ember-js-mock popularity was classified as not popular.
We found that ember-js-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.