New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-unit-test-helper

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-unit-test-helper - npm Package Compare versions

Comparing version 9.3.0 to 9.4.0

.nyc_output/38205621-4efc-454a-95d7-5d16714a4af6.json

2

dist/injectHelper.d.ts
/// <reference types="jasmine" />
import { AbstractType, Type } from '@angular/core';
export declare function injectClass<TDependency, TReturn>(dependency: Type<TDependency> | AbstractType<TDependency>, testBed?: import("@angular/core/testing").TestBedStatic): TReturn;
export declare function injectClass<TDependency>(dependency: Type<TDependency> | AbstractType<TDependency>, testBed?: import("@angular/core/testing").TestBedStatic): TDependency;
export declare function injectSpy<TDependency>(dependency: Type<TDependency> | AbstractType<TDependency>, testBed?: import("@angular/core/testing").TestBedStatic): jasmine.SpyObj<TDependency>;
{
"name": "angular-unit-test-helper",
"version": "9.3.0",
"version": "9.4.0",
"description": "Helper functions to help write unit tests in Angular using mocks and spies",

@@ -24,3 +24,3 @@ "main": "dist/index.js",

"test:ci": "ts-node ./node_modules/jasmine-xml-reporter/bin/jasmine.js --config=./jasmine.json --junitreport --output=test_results/",
"test:nyc": "nyc ts-node node_modules/jasmine/bin/jasmine --config=./jasmine.json --cache=false",
"test:nyc": "nyc node_modules/ts-node/dist/bin.js node_modules/jasmine/bin/jasmine --config=./jasmine.json --cache=false",
"init:env": "init-dev-env generate-dot-env example.env -f",

@@ -50,3 +50,3 @@ "updatePeers": "npm i -D @angular/core@latest @angular/compiler@latest rxjs@latest typescript@3.7.5 jasmine@latest"

"@angular/core": "^9.0.6",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/jasmine": "^3.5.9",

@@ -66,3 +66,3 @@ "@types/node": "^13.9.0",

"npm-run-all": "^4.1.5",
"nyc": "^15.0.0",
"nyc": "^14.1.1",
"prettier": "^1.19.1",

@@ -69,0 +69,0 @@ "prettier-tslint": "^0.4.2",

@@ -6,2 +6,3 @@ # Angular Unit Test Helper

[![CircleCI](https://circleci.com/gh/duluca/angular-unit-test-helper.svg?style=svg)](https://circleci.com/gh/duluca/angular-unit-test-helper)
[![Coverage Status](https://coveralls.io/repos/github/duluca/angular-unit-test-helper/badge.svg)](https://coveralls.io/github/duluca/angular-unit-test-helper)

@@ -129,3 +130,3 @@ ## Goal

### `injectClass<TDependency, TReturn>(dependency: Type<TDependency> | AbstractType<TDependency>): TReturn`
### `injectClass<TDependency>(dependency: Type<TDependency> | AbstractType<TDependency>): TDependency`

@@ -138,3 +139,3 @@ Helper function to inject a dependency, like a service, into the TestBed with a typed return variable.

beforeEach(() => {
weatherServiceMock = injectClass(WeatherService)
weatherService = injectClass(WeatherService)
})

@@ -147,3 +148,3 @@ ```

beforeEach(() => {
weatherServiceMock = TestBed.inject(WeatherService) as any
weatherService = TestBed.inject(WeatherService)
})

@@ -154,3 +155,3 @@ ```

Same as injectOne, but more descriptive to read for developers if returning a mocked SpyObj.
Similar to `injectClass`, but more descriptive to read for developers if returning a mocked SpyObj.

@@ -157,0 +158,0 @@ Usage

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc