
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
@collectivehealth/unity
Advanced tools
A library to make unit testing Angular 1 applications suck less.
Unity is a library that helps you write shorter, cleaner unit tests for your Angular 1.x applications by eliminating much of the boilerplate requried to set up a test suite and by providing utility functions for common tasks.
>=1.3.0.babel-polyfill.yarn add --dev @collectivehealth/unity
or
npm install --save-dev @collectivehealth/unity
let $controller;
let $document;
let $location;
let $q;
let $scope;
describe('MyController', () => {
beforeEach(module('MyApp'));
beforeEach(inject((_$controller_, _$document_, _$location_, _$q_) => {
$controller = _$controller_;
$document = _$document_;
$location = _$location_;
$q = _$q_;
$scope = {};
}));
it('should work', () => {
let myCtrl = $controller('MyCtrl', {
$scope: $scope
});
// ...
});
});
import {
controller,
get,
module
} from '@collectivehealth/unity';
describe('MyCtrl', () => {
let T;
beforeEach(() => {
module('MyApp');
T = controller('MyCtrl');
});
it('should work', () => {
// T.$scope is the controller's scope.
// T.MyCtrl is the controller instance.
// Use get('$document') and get('$location') to interact with other injectables.
});
});
get() wherever you need it! 😺For more information, check out the documentation. Happy testing! 🎉
FAQs
A library to make unit testing Angular 1 applications suck less.
The npm package @collectivehealth/unity receives a total of 0 weekly downloads. As such, @collectivehealth/unity popularity was classified as not popular.
We found that @collectivehealth/unity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 24 open source maintainers collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.