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

ng-mocks

Package Overview
Dependencies
Maintainers
2
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-mocks - npm Package Compare versions

Comparing version 13.1.1 to 13.2.0

lib/mock-helper/mock-helper.default-config.d.ts

2

lib/common/decorate.mock.d.ts
import { AnyType } from './core.types';
import { ngMocksMockConfig } from './mock';
export default function (mock: AnyType<any>, source: AnyType<any>, config?: ngMocksMockConfig): void;
export default function (mock: AnyType<any>, source: AnyType<any>, configInput?: ngMocksMockConfig): void;
import { InjectionToken } from '@angular/core';
import { IMockBuilderConfig } from '../mock-builder/types';
import { AnyType } from './core.types';

@@ -12,2 +13,3 @@ interface NgMocksUniverse {

getBuildDeclaration: (def: any) => any | undefined;
getConfigMock: () => Map<any, IMockBuilderConfig>;
getDefaults: () => Map<any, ['mock' | 'keep' | 'replace' | 'exclude', any?]>;

@@ -14,0 +16,0 @@ getLocalMocks: () => Array<[any, any]>;

@@ -1,6 +0,6 @@

import { NgModule } from '@angular/core';
import { TestModuleMetadata } from '@angular/core/testing';
import { MockBuilderPromise } from './mock-builder.promise';
import { IMockBuilderResult } from './types';
export declare class MockBuilderPerformance extends MockBuilderPromise {
build(): NgModule;
build(): TestModuleMetadata;
then<TResult1 = IMockBuilderResult>(fulfill?: ((value: IMockBuilderResult) => PromiseLike<TResult1>) | undefined | null, reject?: ((reason: any) => PromiseLike<never>) | undefined | null): Promise<TResult1>;

@@ -7,0 +7,0 @@ private cloneConfig;

@@ -1,3 +0,3 @@

import { NgModule, Provider } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { Provider } from '@angular/core';
import { TestBed, TestModuleMetadata } from '@angular/core/testing';
import { Type } from '../common/core.types';

@@ -23,3 +23,3 @@ import { MockBuilderStash } from './mock-builder-stash';

beforeCompileComponents(callback: (testBed: typeof TestBed) => void): this;
build(): NgModule;
build(): TestModuleMetadata;
catch(reject?: ((reason: any) => PromiseLike<never>) | undefined | null): Promise<IMockBuilderResult>;

@@ -26,0 +26,0 @@ exclude(def: any): this;

@@ -1,3 +0,3 @@

import { InjectionToken, NgModule, PipeTransform, Provider } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { InjectionToken, PipeTransform, Provider } from '@angular/core';
import { TestBed, TestModuleMetadata } from '@angular/core/testing';
import { AnyType } from '../common/core.types';

@@ -55,3 +55,3 @@ export interface IMockBuilderResult {

*/
build(): NgModule;
build(): TestModuleMetadata;
/**

@@ -58,0 +58,0 @@ * @see https://ng-mocks.sudo.eu/api/MockBuilder#exclude

@@ -5,2 +5,3 @@ import { DebugNode, EventEmitter, InjectionToken, Injector, Provider, TemplateRef } from '@angular/core';

import { NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';
import { IMockBuilderConfig } from '../mock-builder/types';
import { MockedDebugElement, MockedDebugNode } from '../mock-render/types';

@@ -39,17 +40,21 @@ import { CustomMockFunction, MockedFunction } from '../mock-service/types';

/**
* @see https://ng-mocks.sudo.eu/api/ngMocks/defaultConfig
*/
defaultConfig<T>(token: string | InjectionToken<T> | AnyType<T>, config?: IMockBuilderConfig): void;
/**
* @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock
*/
defaultMock<T>(token: InjectionToken<T>, handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>): void;
defaultMock<T>(token: InjectionToken<T>, handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>, config?: IMockBuilderConfig): void;
/**
* @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock
*/
defaultMock<T = any>(token: string, handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>): void;
defaultMock<T = any>(token: string, handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>, config?: IMockBuilderConfig): void;
/**
* @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock
*/
defaultMock<T>(def: AnyType<T>, handler?: (value: T, injector: Injector) => void | Partial<T>): void;
defaultMock<T>(def: AnyType<T>, handler?: (value: T, injector: Injector) => void | Partial<T>, config?: IMockBuilderConfig): void;
/**
* @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock
*/
defaultMock<T = any>(defs: Array<AnyType<T> | InjectionToken<T>>, handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>): void;
defaultMock<T = any>(defs: Array<AnyType<T> | InjectionToken<T>>, handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>, config?: IMockBuilderConfig): void;
/**

@@ -56,0 +61,0 @@ * @see https://ng-mocks.sudo.eu/api/ngMocks/event

@@ -11,3 +11,4 @@ declare const _default: {

crawl: (sel: import("../..").DebugNodeSelector, callback: (node: import("@angular/core").DebugNode) => boolean | void, includeTextNode?: boolean) => void;
defaultMock: <T>(def: string | import("../..").AnyType<T> | import("@angular/core").InjectionToken<T> | (string | import("../..").AnyType<T> | import("@angular/core").InjectionToken<T>)[], callback?: ((instance: T | undefined, injector: import("@angular/core").Injector) => void | Partial<T>) | undefined) => void;
defaultConfig: <T>(def: string | import("../..").AnyType<T> | import("@angular/core").InjectionToken<T> | (string | import("../..").AnyType<T> | import("@angular/core").InjectionToken<T>)[], config?: import("../..").IMockBuilderConfig | undefined) => void;
defaultMock: <T_1>(def: string | import("../..").AnyType<T_1> | import("@angular/core").InjectionToken<T_1> | (string | import("../..").AnyType<T_1> | import("@angular/core").InjectionToken<T_1>)[], callback?: ((instance: T_1 | undefined, injector: import("@angular/core").Injector) => void | Partial<T_1>) | undefined) => void;
event: (event: string, init?: EventInit | undefined, overrides?: Partial<Event | UIEvent | KeyboardEvent | MouseEvent | TouchEvent> | undefined) => CustomEvent<any>;

@@ -18,3 +19,3 @@ faster: () => void;

findInstance: (...args: any[]) => any;
findInstances: <T_1>(...args: any[]) => T_1[];
findInstances: <T_2>(...args: any[]) => T_2[];
findTemplateRef: (...args: any[]) => any;

@@ -25,3 +26,3 @@ findTemplateRefs: (...args: any[]) => import("@angular/core").TemplateRef<any>[];

formatText: (html: any, outer?: boolean) => any;
get: <T_2>(...args: any[]) => any;
get: <T_3>(...args: any[]) => any;
globalExclude: (source: import("../..").AnyType<any> | import("@angular/core").InjectionToken<any>) => void;

@@ -41,4 +42,4 @@ globalKeep: (source: import("../..").AnyType<any> | import("@angular/core").InjectionToken<any>) => void;

revealAll: (...args: any[]) => any[];
stub: <T_3 = import("../..").MockedFunction>(instance: any, override: any, style?: "get" | "set" | undefined) => T_3;
stubMember: <T_4 extends object>(instance: T_4, key: any, value: any, encapsulation?: "get" | "set" | undefined) => any;
stub: <T_4 = import("../..").MockedFunction>(instance: any, override: any, style?: "get" | "set" | undefined) => T_4;
stubMember: <T_5 extends object>(instance: T_5, key: any, value: any, encapsulation?: "get" | "set" | undefined) => any;
throwOnConsole: (...methods: (keyof Console)[]) => void;

@@ -45,0 +46,0 @@ touch: (sel: import("../..").DebugNodeSelector | import("@angular/core").DebugElement) => void;

{
"name": "ng-mocks",
"version": "13.1.1",
"version": "13.2.0",
"description": "An Angular testing library for creating mock services, components, directives, pipes and modules in unit tests, which includes shallow rendering, precise stubs to dump child dependencies, supports Angular 5 6 7 8 9 10 11 12 13, jasmine and jest.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

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