
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
@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.
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
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.