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

@corez/mock

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corez/mock - npm Package Compare versions

Comparing version 0.13.2 to 0.13.3

2

dist/cjs/decorators.js

@@ -59,3 +59,3 @@ "use strict";

const targetClass = value;
const mockedClass = import_mock.mock.class(targetClass, targetOrOptionsOrImpl);
const mockedClass = import_mock.mock.class(targetClass);
const descriptors = Object.getOwnPropertyDescriptors(targetClass.prototype);

@@ -62,0 +62,0 @@ for (const [key, descriptor] of Object.entries(descriptors)) {

@@ -25,3 +25,3 @@ import RandExp from "randexp";

const targetClass = value;
const mockedClass = mock.class(targetClass, targetOrOptionsOrImpl);
const mockedClass = mock.class(targetClass);
const descriptors = Object.getOwnPropertyDescriptors(targetClass.prototype);

@@ -28,0 +28,0 @@ for (const [key, descriptor] of Object.entries(descriptors)) {

{
"name": "@corez/mock",
"version": "0.13.2",
"version": "0.13.3",
"description": "A powerful and flexible TypeScript mocking library for testing",

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

"@types/micromatch": "^4.0.9",
"@types/node": "^22.10.7",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"@types/node": "^22.10.10",
"@typescript-eslint/eslint-plugin": "^8.21.0",
"@typescript-eslint/parser": "^8.21.0",
"del-cli": "^6.0.0",

@@ -65,3 +65,3 @@ "eslint": "^9.18.0",

"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-prettier": "^5.2.2",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-simple-import-sort": "^12.1.1",

@@ -68,0 +68,0 @@ "eslint-plugin-unused-imports": "^4.1.4",

@@ -54,3 +54,3 @@ import RandExp from 'randexp';

const targetClass = value as Constructor<T>;
const mockedClass = mock.class(targetClass, targetOrOptionsOrImpl as MockOptionsInput);
const mockedClass = mock.class(targetClass);
// Add getter mocks to prototype

@@ -57,0 +57,0 @@ const descriptors = Object.getOwnPropertyDescriptors(targetClass.prototype);

@@ -216,9 +216,9 @@ import type {Faker} from '@faker-js/faker';

// With operations
with<T>(value: T): (target: any, context: DecoratorContext) => any; // ExactValue
with<T>(fn: () => T): (target: any, context: DecoratorContext) => any; // Callback
with(regex: RegExp): (target: any, context: DecoratorContext) => any; // Regex pattern
with<T>(targetClass: Constructor<T>): (target: any, context: DecoratorContext) => any; // Class type
with<T>(enumObj: {enum: Record<string, T>}): (target: any, context: DecoratorContext) => any; // EnumObject
with<T>(options: {type: Constructor<T>; count: number}): (target: any, context: DecoratorContext) => any; // MultiClass
withFaker<T>(fn: (faker: Faker) => T, options?: FakerOptions): (target: any, context: DecoratorContext) => any; // Faker callback with options
with<T>(value: T): (target: any, context: DecoratorContext) => any;
with<T>(fn: () => T): (target: any, context: DecoratorContext) => any;
with(regex: RegExp): (target: any, context: DecoratorContext) => any;
with<T>(targetClass: Constructor<T>): (target: any, context: DecoratorContext) => any;
with<T>(enumObj: {enum: Record<string, T>}): (target: any, context: DecoratorContext) => any;
with<T>(options: {type: Constructor<T>; count: number}): (target: any, context: DecoratorContext) => any;
withFaker<T>(fn: (faker: Faker) => T, options?: FakerOptions): (target: any, context: DecoratorContext) => any;
}

@@ -225,0 +225,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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