Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vue/test-utils

Package Overview
Dependencies
Maintainers
5
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/test-utils - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

2

dist/components/RouterLinkStub.d.ts

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

};
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
to: {

@@ -13,0 +13,0 @@ type: (StringConstructor | ObjectConstructor)[];

@@ -6,7 +6,7 @@ import { FunctionalComponent, ComponentPublicInstance, ComponentOptionsWithObjectProps, ComponentOptionsWithArrayProps, ComponentOptionsWithoutProps, ExtractPropTypes, VNodeProps, ComponentOptionsMixin, DefineComponent, MethodOptions, AllowedComponentProps, ComponentCustomProps, ExtractDefaultPropTypes, EmitsOptions, ComputedOptions, ComponentPropsOptions, Prop } from 'vue';

declare type ComponentMountingOptions<T> = T extends DefineComponent<infer PropsOrPropOptions, any, infer D, any, any> ? MountingOptions<Partial<ExtractDefaultPropTypes<PropsOrPropOptions>> & Omit<Readonly<ExtractPropTypes<PropsOrPropOptions>> & PublicProps, keyof ExtractDefaultPropTypes<PropsOrPropOptions>>, D> & Record<string, any> : MountingOptions<any>;
export declare function mount<V>(originalComponent: {
export declare function mount<V extends {}>(originalComponent: {
new (...args: any[]): V;
__vccOpts: any;
}, options?: MountingOptions<any> & Record<string, any>): VueWrapper<ComponentPublicInstance<V>>;
export declare function mount<V, P>(originalComponent: {
export declare function mount<V extends {}, P>(originalComponent: {
new (...args: any[]): V;

@@ -16,7 +16,7 @@ __vccOpts: any;

}, options?: MountingOptions<P & PublicProps> & Record<string, any>): VueWrapper<ComponentPublicInstance<V>>;
export declare function mount<V>(originalComponent: {
export declare function mount<V extends {}>(originalComponent: {
new (...args: any[]): V;
registerHooks(keys: string[]): void;
}, options?: MountingOptions<any> & Record<string, any>): VueWrapper<ComponentPublicInstance<V>>;
export declare function mount<V, P>(originalComponent: {
export declare function mount<V extends {}, P>(originalComponent: {
new (...args: any[]): V;

@@ -26,7 +26,7 @@ props(Props: P): any;

}, options?: MountingOptions<P & PublicProps> & Record<string, any>): VueWrapper<ComponentPublicInstance<V>>;
export declare function mount<Props, E extends EmitsOptions = {}>(originalComponent: FunctionalComponent<Props, E>, options?: MountingOptions<Props & PublicProps> & Record<string, any>): VueWrapper<ComponentPublicInstance<Props>>;
export declare function mount<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, PP = PublicProps, Props = Readonly<ExtractPropTypes<PropsOrPropOptions>>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>>(component: DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>, options?: MountingOptions<Partial<Defaults> & Omit<Props & PublicProps, keyof Defaults>, D> & Record<string, any>): VueWrapper<InstanceType<DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>>>;
export declare function mount<Props extends {}, E extends EmitsOptions = {}>(originalComponent: FunctionalComponent<Props, E>, options?: MountingOptions<Props & PublicProps> & Record<string, any>): VueWrapper<ComponentPublicInstance<Props>>;
export declare function mount<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, PP = PublicProps, Props = Readonly<ExtractPropTypes<PropsOrPropOptions>>, Defaults extends {} = ExtractDefaultPropTypes<PropsOrPropOptions>>(component: DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>, options?: MountingOptions<Partial<Defaults> & Omit<Props & PublicProps, keyof Defaults>, D> & Record<string, any>): VueWrapper<InstanceType<DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>>>;
export declare function mount<T extends DefineComponent<any, any, any, any>>(component: T, options?: ComponentMountingOptions<T>): VueWrapper<InstanceType<T>>;
export declare function mount<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<Props & PublicProps, D>): VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>> & Record<string, any>;
export declare function mount<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string, Props extends Readonly<{
export declare function mount<Props = {}, RawBindings = {}, D extends {} = {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<Props & PublicProps, D>): VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>> & Record<string, any>;
export declare function mount<PropNames extends string, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string, Props extends Readonly<{
[key in PropNames]?: any;

@@ -36,4 +36,4 @@ }> = Readonly<{

}>>(componentOptions: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, E, Mixin, Extends, EE, Props>, options?: MountingOptions<Props & PublicProps, D>): VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E>>;
export declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<ExtractPropTypes<PropsOptions> & PublicProps, D>): VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>;
export declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<ExtractPropTypes<PropsOptions> & PublicProps, D>): VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>;
export declare const shallowMount: typeof mount;
export {};

@@ -1,2 +0,2 @@

import { VNodeTypes, ConcreteComponent, DefineComponent } from 'vue';
import { Teleport, VNodeTypes, ConcreteComponent, DefineComponent } from 'vue';
import { Stubs } from './types';

@@ -9,3 +9,3 @@ export declare type CustomCreateStub = (params: {

name: string;
type?: ConcreteComponent;
type?: VNodeTypes | typeof Teleport;
renderStubDefaultSlot?: boolean;

@@ -12,0 +12,0 @@ }

export declare const camelize: (str: string) => string;
export declare const capitalize: (str: string) => string;
export declare const hyphenate: (str: string) => string;
export declare const enum ShapeFlags {
ELEMENT = 1,
FUNCTIONAL_COMPONENT = 2,
STATEFUL_COMPONENT = 4,
TEXT_CHILDREN = 8,
ARRAY_CHILDREN = 16,
SLOTS_CHILDREN = 32,
TELEPORT = 64,
SUSPENSE = 128,
COMPONENT_SHOULD_KEEP_ALIVE = 256,
COMPONENT_KEPT_ALIVE = 512,
COMPONENT = 6
}
{
"name": "@vue/test-utils",
"version": "2.0.2",
"version": "2.1.0",
"license": "MIT",

@@ -25,44 +25,41 @@ "main": "dist/vue-test-utils.cjs.js",

"devDependencies": {
"@babel/core": "7.18.6",
"@babel/preset-env": "7.18.6",
"@babel/types": "7.18.6",
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@types/jest": "27.5.0",
"@types/node": "18.0.0",
"@types/pretty": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.30.3",
"@typescript-eslint/parser": "^5.30.3",
"@vue/babel-plugin-jsx": "^1.1.1",
"@vue/compat": "3.2.37",
"@vue/compiler-dom": "3.2.37",
"@vue/compiler-sfc": "3.2.37",
"@vue/vue3-jest": "27.0.0-alpha.4",
"babel-jest": "27.5.1",
"babel-preset-jest": "28.1.1",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "14.1.0",
"@rollup/plugin-replace": "4.0.0",
"@types/node": "18.0.6",
"@types/pretty": "2.0.1",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"@vitejs/plugin-vue": "3.1.0",
"@vitejs/plugin-vue-jsx": "2.0.1",
"@vitest/coverage-c8": "0.23.0",
"@vue/compat": "3.2.40",
"@vue/compiler-dom": "3.2.40",
"@vue/compiler-sfc": "3.2.40",
"@vue/runtime-core": "3.2.40",
"c8": "7.12.0",
"eslint": "8.24.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"husky": "^8.0.1",
"jest": "27.5.1",
"jsdom": "^20.0.0",
"jsdom-global": "^3.0.2",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"pretty": "^2.0.0",
"reflect-metadata": "^0.1.13",
"rollup": "^2.75.7",
"rollup-plugin-typescript2": "^0.32.1",
"ts-jest": "27.1.5",
"husky": "8.0.1",
"jsdom": "20.0.0",
"jsdom-global": "3.0.2",
"lint-staged": "13.0.3",
"prettier": "2.7.1",
"pretty": "2.0.0",
"reflect-metadata": "0.1.13",
"rollup": "2.79.1",
"rollup-plugin-typescript2": "0.34.0",
"tslib": "2.4.0",
"typescript": "4.7.4",
"vitepress": "^0.22.4",
"vue": "3.2.37",
"vue-class-component": "^8.0.0-rc.1",
"vue-jest": "^5.0.0-alpha.10",
"vue-router": "^4.0.16",
"vue-tsc": "0.38.2",
"vuex": "^4.0.2"
"typescript": "4.8.4",
"unplugin-vue-components": "0.22.7",
"vite": "3.1.4",
"vitepress": "0.22.4",
"vitest": "0.22.1",
"vue": "3.2.40",
"vue-class-component": "8.0.0-rc.1",
"vue-router": "4.1.5",
"vue-tsc": "0.40.13",
"vuex": "4.0.2"
},

@@ -77,12 +74,14 @@ "peerDependencies": {

"scripts": {
"test": "yarn jest --runInBand tests/",
"test:build": "yarn jest --runInBand tests/ -use-build",
"test": "vitest",
"test:coverage": "vitest --coverage",
"test:watch": "vitest --watch",
"test:build": "vitest --mode test-build",
"tsd": "tsc -p test-dts/tsconfig.tsd.json",
"build": "yarn rollup -c rollup.config.js",
"build": "rollup -c rollup.config.js",
"lint": "eslint --ext .ts src/ tests/",
"lint:fix": "yarn lint --fix",
"lint:fix": "pnpm run lint --fix",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"vue-tsc": "vue-tsc --noEmit -p tsconfig.volar.json",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm run build"
},

@@ -116,3 +115,13 @@ "husky": {

},
"homepage": "https://github.com/vuejs/test-utils"
"homepage": "https://github.com/vuejs/test-utils",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"@algolia/client-search",
"@types/react",
"react",
"react-dom"
]
}
}
}

@@ -22,3 +22,3 @@ # Vue Test Utils

Get started by running `yarn install`. You can run the tests with `yarn test`. That's it!
Get started by running `pnpm install`. You can run the tests with `pnpm test`. That's it!

@@ -25,0 +25,0 @@ ## Comparison with Vue Test Utils v1 (targeting Vue 2)

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 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