Socket
Socket
Sign inDemoInstall

@vue/test-utils

Package Overview
Dependencies
21
Maintainers
4
Versions
119
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-rc.12 to 2.0.0-rc.13

4

dist/components/RouterLinkStub.d.ts

@@ -10,2 +10,4 @@ export declare const RouterLinkStub: import("vue").DefineComponent<{

to: unknown;
} & {}>, {}>;
} & {}> & {
[x: string & `on${string}`]: undefined;
}, {}>;

@@ -1,12 +0,89 @@

import { ComponentOptions, VNodeTypes, ConcreteComponent } from 'vue';
import { VNodeTypes, ConcreteComponent, DefineComponent, ComponentPropsOptions } from 'vue';
import { Stubs } from './types';
interface StubOptions {
name: string;
props?: any;
propsDeclaration?: any;
propsDeclaration?: ComponentPropsOptions;
renderStubDefaultSlot?: boolean;
}
export declare const registerStub: (source: ConcreteComponent, stub: ConcreteComponent) => void;
export declare const getOriginalVNodeTypeFromStub: (type: ConcreteComponent) => VNodeTypes | undefined;
export declare const addToDoNotStubComponents: (type: ConcreteComponent) => WeakSet<ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
export declare const createStub: ({ name, propsDeclaration, renderStubDefaultSlot }: StubOptions) => ComponentOptions;
export declare function stubComponents(stubs?: Record<any, any>, shallow?: boolean, renderStubDefaultSlot?: boolean): void;
export declare const createStub: ({ name, propsDeclaration, renderStubDefaultSlot }: StubOptions) => DefineComponent<ComponentPropsOptions<{
[x: string]: unknown;
}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<(unknown[] & {
[x: number]: string;
} & {
[Symbol.iterator]?: IterableIterator<string> | undefined;
concat?: string[] | undefined;
indexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
lastIndexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
slice?: string[] | undefined;
length?: number | undefined;
includes?: ((searchElement: string, fromIndex?: number | undefined) => boolean) | undefined;
at?: ((index: number) => string | undefined) | undefined;
[Symbol.unscopables]?: {
copyWithin: boolean;
entries: boolean;
fill: boolean;
find: boolean;
findIndex: boolean;
keys: boolean;
values: boolean;
} | undefined;
pop?: string | undefined;
push?: number | undefined;
join?: string | undefined;
reverse?: string[] | undefined;
shift?: string | undefined;
sort?: string[] | undefined;
splice?: {
(start: number, deleteCount?: number | undefined): string[];
(start: number, deleteCount: number, ...items: string[]): string[];
} | undefined;
unshift?: number | undefined;
every?: {
<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
} | undefined;
some?: ((predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
forEach?: ((callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void) | undefined;
map?: (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | undefined;
filter?: {
<S_1 extends string>(predicate: (value: string, index: number, array: string[]) => value is S_1, thisArg?: any): S_1[];
(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
} | undefined;
reduce?: {
(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
<U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
} | undefined;
reduceRight?: {
(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
<U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
} | undefined;
find?: {
<S_2 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_2, thisArg?: any): S_2 | undefined;
(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
} | undefined;
findIndex?: ((predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number) | undefined;
fill?: ((value: string, start?: number | undefined, end?: number | undefined) => string[]) | undefined;
copyWithin?: ((target: number, start: number, end?: number | undefined) => string[]) | undefined;
entries?: IterableIterator<[number, string]> | undefined;
keys?: IterableIterator<number> | undefined;
values?: IterableIterator<string> | undefined;
flatMap?: (<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
flat?: unknown[] | undefined;
toString?: string | undefined;
toLocaleString?: string | undefined;
}) | ({
[x: string]: unknown;
} & {} & {
[x: string]: import("vue").Prop<unknown, unknown> | null | undefined;
})> & {
[x: string & `on${string}`]: undefined;
}, {
[x: number]: string;
} | {}>;
export declare function stubComponents(stubs?: Stubs, shallow?: boolean, renderStubDefaultSlot?: boolean): void;
export {};

@@ -14,4 +14,4 @@ import { Component, ComponentOptions, Directive, Plugin, AppConfig, VNode, VNodeProps } from 'vue';

}
export declare type FindComponentSelector = RefSelector | NameSelector | string;
export declare type FindAllComponentsSelector = NameSelector | string;
export declare type FindComponentSelector = RefSelector | NameSelector;
export declare type FindAllComponentsSelector = NameSelector;
export declare type Slot = VNode | string | {

@@ -71,2 +71,4 @@ render: Function;

}
export declare type Stub = boolean | Component;
export declare type Stubs = Record<string, Stub> | Array<string>;
export declare type GlobalMountOptions = {

@@ -115,3 +117,3 @@ /**

*/
stubs?: Record<any, any>;
stubs?: Stubs;
/**

@@ -118,0 +120,0 @@ * Allows rendering the default slot content, even when using

@@ -5,3 +5,3 @@ import { GlobalMountOptions } from './types';

export declare const isObject: (obj: unknown) => obj is Record<string, any>;
export declare const mergeDeep: (target: Record<string, any>, source: Record<string, any>) => Record<string, any>;
export declare const mergeDeep: (target: Record<string, unknown>, source: Record<string, unknown>) => Record<string, any>;
export declare function isClassComponent(component: unknown): boolean;

@@ -11,4 +11,3 @@ export declare function isComponent(component: unknown): component is ConcreteComponent;

export declare function isObjectComponent(component: unknown): component is ComponentOptions;
export declare function isHTML(str: string): boolean;
export declare function textContent(element: Element): string;
export declare function hasOwnProperty<O extends {}, P extends PropertyKey>(obj: O, prop: P): obj is O & Record<P, unknown>;
import * as vue from 'vue';
export declare function processSlot(source?: string, Vue?: typeof vue): {
inheritAttrs: boolean;
render: any;
components: {
SlotWrapper: {
inheritAttrs: boolean;
setup(_: Record<string, any>, ctx: vue.SetupContext<vue.EmitsOptions>): () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
};
};
};
export declare function processSlot(source?: string, Vue?: typeof vue): (ctx?: {}) => any;

@@ -11,3 +11,3 @@ import { ComponentPublicInstance, App } from 'vue';

private __setProps;
constructor(app: App | null, vm: ComponentPublicInstance, setProps?: (props: Record<string, any>) => void);
constructor(app: App | null, vm: ComponentPublicInstance, setProps?: (props: Record<string, unknown>) => void);
private get hasMultipleRoots();

@@ -31,6 +31,4 @@ private get parentElement();

get<T extends Element>(selector: string): Omit<DOMWrapper<T>, 'exists'>;
findComponent<T extends ComponentPublicInstance>(selector: new () => T): VueWrapper<T>;
findComponent<T extends ComponentPublicInstance>(selector: FindComponentSelector): VueWrapper<T>;
getComponent<T extends ComponentPublicInstance>(selector: new () => T): Omit<VueWrapper<T>, 'exists'>;
getComponent<T extends ComponentPublicInstance>(selector: FindComponentSelector): Omit<VueWrapper<T>, 'exists'>;
findComponent<T extends ComponentPublicInstance>(selector: FindComponentSelector | (new () => T)): VueWrapper<T>;
getComponent<T extends ComponentPublicInstance>(selector: FindComponentSelector | (new () => T)): Omit<VueWrapper<T>, 'exists'>;
findAllComponents(selector: FindAllComponentsSelector): VueWrapper<T>[];

@@ -41,7 +39,7 @@ findAll<K extends keyof HTMLElementTagNameMap>(selector: K): DOMWrapper<HTMLElementTagNameMap[K]>[];

isVisible(): boolean;
setData(data: Record<string, any>): Promise<void>;
setProps(props: Record<string, any>): Promise<void>;
setValue(value: any, prop?: string): Promise<void>;
setData(data: Record<string, unknown>): Promise<void>;
setProps(props: Record<string, unknown>): Promise<void>;
setValue(value: unknown, prop?: string): Promise<void>;
unmount(): void;
}
export declare function createWrapper<T extends ComponentPublicInstance>(app: App | null, vm: ComponentPublicInstance, setProps?: (props: Record<string, any>) => void): VueWrapper<T>;
export declare function createWrapper<T extends ComponentPublicInstance>(app: App | null, vm: ComponentPublicInstance, setProps?: (props: Record<string, unknown>) => void): VueWrapper<T>;
{
"name": "@vue/test-utils",
"version": "2.0.0-rc.12",
"version": "2.0.0-rc.13",
"license": "MIT",

@@ -16,15 +16,15 @@ "main": "dist/vue-test-utils.cjs.js",

"@babel/core": "^7.14.8",
"@babel/preset-env": "^7.14.8",
"@babel/preset-env": "^7.15.0",
"@babel/types": "^7.14.8",
"@rollup/plugin-commonjs": "^19.0.2",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-replace": "^3.0.0",
"@types/jest": "26.0.24",
"@types/node": "16.4.3",
"@types/jest": "27.0.1",
"@types/node": "16.7.4",
"@types/pretty": "^2.0.0",
"@vue/babel-plugin-jsx": "^1.0.6",
"@vue/compat": "^3.1.5",
"@vue/compiler-dom": "^3.1.4",
"@vue/compiler-sfc": "3.1.5",
"@vue/compat": "3.2.4",
"@vue/compiler-dom": "3.2.6",
"@vue/compiler-sfc": "3.2.6",
"babel-jest": "^26.6.3",

@@ -34,18 +34,19 @@ "babel-preset-jest": "^27.0.6",

"jest": "25.5.4",
"jsdom": "^16.6.0",
"jsdom": "^17.0.0",
"jsdom-global": "^3.0.2",
"lint-staged": "^11.1.1",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"pretty": "^2.0.0",
"reflect-metadata": "^0.1.13",
"rollup": "^2.54.0",
"rollup": "^2.56.3",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "25.3.1",
"tslib": "^2.3.1",
"typescript": "^4.3.5",
"vitepress": "^0.15.6",
"vue": "3.1.5",
"vitepress": "^0.16.1",
"vue": "3.2.6",
"vue-class-component": "^8.0.0-rc.1",
"vue-jest": "^5.0.0-alpha.10",
"vue-router": "^4.0.10",
"vue-tsc": "0.2.2",
"vue-router": "^4.0.11",
"vue-tsc": "0.3.0",
"vuex": "^4.0.2"

@@ -52,0 +53,0 @@ },

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

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

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

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc