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

@quilted/react-testing

Package Overview
Dependencies
Maintainers
1
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quilted/react-testing - npm Package Compare versions

Comparing version 0.5.19 to 0.5.20

18

build/typescript/environment.d.ts

@@ -10,4 +10,4 @@ import type { ReactElement } from 'react';

}
export declare type NodeCreationOptions<T, Extensions extends PlainObject = EmptyObject> = EmptyObject extends Extensions ? BaseNodeCreationOptions<T, Extensions> : BaseNodeCreationOptions<T, Extensions> & Extensions;
export interface EnvironmentNodeCreator<Extensions> {
export type NodeCreationOptions<T, Extensions extends PlainObject = EmptyObject> = EmptyObject extends Extensions ? BaseNodeCreationOptions<T, Extensions> : BaseNodeCreationOptions<T, Extensions> & Extensions;
export interface EnvironmentNodeCreator<Extensions extends PlainObject> {
<T>(options: NodeCreationOptions<T, Extensions>): BaseNode<T, Extensions>;

@@ -22,3 +22,3 @@ }

}
export declare type AfterMountOption<MountOptions extends PlainObject, Context extends PlainObject, Actions extends PlainObject, Extensions extends PlainObject, Async extends boolean> = Async extends true ? {
export type AfterMountOption<MountOptions extends PlainObject, Context extends PlainObject, Actions extends PlainObject, Extensions extends PlainObject, Async extends boolean> = Async extends true ? {
afterMount(wrapper: RootNode<unknown, Context, Actions, Extensions>, options: MountOptions): PromiseLike<void>;

@@ -28,3 +28,3 @@ } : {

};
export declare type ContextOption<MountOptions extends PlainObject = EmptyObject, ExistingContext extends PlainObject = EmptyObject, AdditionalContext extends PlainObject = EmptyObject> = AdditionalContext extends EmptyObject ? {
export type ContextOption<MountOptions extends PlainObject = EmptyObject, ExistingContext extends PlainObject = EmptyObject, AdditionalContext extends PlainObject = EmptyObject> = AdditionalContext extends EmptyObject ? {
context?: never;

@@ -34,3 +34,3 @@ } : {

};
export declare type ActionsOption<MountOptions extends PlainObject = EmptyObject, Context extends PlainObject = EmptyObject, ExistingActions extends PlainObject = EmptyObject, AdditionalActions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject> = AdditionalActions extends EmptyObject ? {
export type ActionsOption<MountOptions extends PlainObject = EmptyObject, Context extends PlainObject = EmptyObject, ExistingActions extends PlainObject = EmptyObject, AdditionalActions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject> = AdditionalActions extends EmptyObject ? {
actions?: never;

@@ -43,3 +43,3 @@ } : {

}
export declare type MountOptionsOverrideOption<ExistingMountOptions extends PlainObject = EmptyObject, AdditionalMountOptions extends PlainObject = EmptyObject> = AdditionalMountOptions extends EmptyObject ? {
export type MountOptionsOverrideOption<ExistingMountOptions extends PlainObject = EmptyObject, AdditionalMountOptions extends PlainObject = EmptyObject> = AdditionalMountOptions extends EmptyObject ? {
options?: never;

@@ -49,4 +49,4 @@ } : {

};
export declare type CustomMountOptions<MountOptions extends PlainObject = EmptyObject, ExistingContext extends PlainObject = EmptyObject, AdditionalContext extends PlainObject = EmptyObject, ExistingActions extends PlainObject = EmptyObject, AdditionalActions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject, Async extends boolean = false> = RenderOption<MountOptions, MergeObjects<ExistingContext, AdditionalContext>> & ContextOption<MountOptions, ExistingContext, AdditionalContext> & ActionsOption<MountOptions, MergeObjects<ExistingContext, AdditionalContext>, ExistingActions, AdditionalActions, Extensions> & AfterMountOption<MountOptions, MergeObjects<ExistingContext, AdditionalContext>, MergeObjects<ExistingActions, AdditionalActions>, Extensions, Async>;
export declare type CustomMountExtendOptions<ExistingMountOptions extends PlainObject = EmptyObject, AdditionalMountOptions extends PlainObject = EmptyObject, ExistingContext extends PlainObject = EmptyObject, AdditionalContext extends PlainObject = EmptyObject, ExistingActions extends PlainObject = EmptyObject, AdditionalActions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject, Async extends boolean = false> = CustomMountOptions<MergeObjects<ExistingMountOptions, AdditionalMountOptions>, ExistingContext, AdditionalContext, ExistingActions, AdditionalActions, Extensions, Async> & MountOptionsOverrideOption<ExistingMountOptions, AdditionalMountOptions>;
export type CustomMountOptions<MountOptions extends PlainObject = EmptyObject, ExistingContext extends PlainObject = EmptyObject, AdditionalContext extends PlainObject = EmptyObject, ExistingActions extends PlainObject = EmptyObject, AdditionalActions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject, Async extends boolean = false> = RenderOption<MountOptions, MergeObjects<ExistingContext, AdditionalContext>> & ContextOption<MountOptions, ExistingContext, AdditionalContext> & ActionsOption<MountOptions, MergeObjects<ExistingContext, AdditionalContext>, ExistingActions, AdditionalActions, Extensions> & AfterMountOption<MountOptions, MergeObjects<ExistingContext, AdditionalContext>, MergeObjects<ExistingActions, AdditionalActions>, Extensions, Async>;
export type CustomMountExtendOptions<ExistingMountOptions extends PlainObject = EmptyObject, AdditionalMountOptions extends PlainObject = EmptyObject, ExistingContext extends PlainObject = EmptyObject, AdditionalContext extends PlainObject = EmptyObject, ExistingActions extends PlainObject = EmptyObject, AdditionalActions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject, Async extends boolean = false> = CustomMountOptions<MergeObjects<ExistingMountOptions, AdditionalMountOptions>, ExistingContext, AdditionalContext, ExistingActions, AdditionalActions, Extensions, Async> & MountOptionsOverrideOption<ExistingMountOptions, AdditionalMountOptions>;
export interface CustomMount<MountOptions extends PlainObject, Context extends PlainObject, Actions extends PlainObject, Extensions extends PlainObject, Async extends boolean> {

@@ -66,3 +66,3 @@ <Props>(element: ReactElement<any>, options?: MountOptions): CustomMountResult<Props, Context, Actions, Extensions, Async>;

}
export declare type CustomMountResult<Props, Context extends PlainObject, Actions extends PlainObject, Extensions extends PlainObject, Async extends boolean> = Async extends true ? Promise<RootNode<Props, Context, Actions, Extensions>> : RootNode<Props, Context, Actions, Extensions>;
export type CustomMountResult<Props, Context extends PlainObject, Actions extends PlainObject, Extensions extends PlainObject, Async extends boolean> = Async extends true ? Promise<RootNode<Props, Context, Actions, Extensions>> : RootNode<Props, Context, Actions, Extensions>;
export interface Environment<Extensions extends PlainObject = EmptyObject> {

@@ -69,0 +69,0 @@ readonly mounted: Set<RootNode<any, any, any, Extensions>>;

@@ -21,3 +21,3 @@ import type { VNode, Component } from 'preact';

}
export declare type PortalNode = PreactVNode<PortalProps>;
export type PortalNode = PreactVNode<PortalProps>;
interface PortalProps {

@@ -24,0 +24,0 @@ vnode: PreactVNode<unknown>;

@@ -8,5 +8,5 @@ import { isNode } from '../environment';

export { mount, createMount, mounted, unmountAll };
declare type Create = Parameters<EnvironmentOptions<any, HtmlNodeExtensions>['update']>[1];
declare type Child = ReturnType<Create> | string;
type Create = Parameters<EnvironmentOptions<any, HtmlNodeExtensions>['update']>[1];
type Child = ReturnType<Create> | string;
export declare function createNodeFromFiber(element: any, create: Create): Child;
//# sourceMappingURL=react-dom.d.ts.map

@@ -42,6 +42,6 @@ import type { ComponentType, LegacyRef } from 'react';

}
declare type Create = Parameters<EnvironmentOptions<any>['update']>[1];
declare type Child = ReturnType<Create> | string;
type Create = Parameters<EnvironmentOptions<any>['update']>[1];
type Child = ReturnType<Create> | string;
export declare function createNodeFromFiber(element: any, create: Create): Child;
export {};
//# sourceMappingURL=react.d.ts.map
import type { ComponentType, Context as ReactContext } from 'react';
import type { Node, PropsFor } from '../types';
declare type PropsFromNode<T> = NonNullable<T> extends Node<infer U, any> ? U : never;
type PropsFromNode<T> = NonNullable<T> extends Node<infer U, any> ? U : never;
declare global {

@@ -5,0 +5,0 @@ namespace jest {

import type { ComponentType, ComponentPropsWithoutRef, HTMLAttributes, Context } from 'react';
export declare type PlainObject = Record<string, any>;
export declare type EmptyObject = Record<string, never>;
export declare type MergeObjects<T, U> = T extends EmptyObject ? U extends EmptyObject ? EmptyObject : U : U extends EmptyObject ? T : T & U;
export declare type PropsFor<T extends string | ComponentType<any>> = T extends string ? T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : T extends ComponentType<any> ? ComponentPropsWithoutRef<T> : HTMLAttributes<T> : T extends ComponentType<any> ? ComponentPropsWithoutRef<T> : never;
export declare type FunctionKeys<T> = {
export type PlainObject = Record<string, any>;
export type EmptyObject = Record<string, never>;
export type MergeObjects<T, U> = T extends EmptyObject ? U extends EmptyObject ? EmptyObject : U : U extends EmptyObject ? T : T & U;
export type PropsFor<T extends string | ComponentType<any>> = T extends string ? T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : T extends ComponentType<any> ? ComponentPropsWithoutRef<T> : HTMLAttributes<T> : T extends ComponentType<any> ? ComponentPropsWithoutRef<T> : never;
export type FunctionKeys<T> = {
[K in keyof T]-?: NonNullable<T[K]> extends (...args: any[]) => any ? K : never;
}[keyof T];
export declare type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends readonly (infer U)[] ? readonly DeepPartial<U>[] : T extends PlainObject ? {
export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends readonly (infer U)[] ? readonly DeepPartial<U>[] : T extends PlainObject ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : T;
export declare type Predicate<Extensions extends PlainObject> = (node: Node<unknown, Extensions>) => boolean;
declare type MaybeFunctionReturnType<T> = T extends (...args: any[]) => any ? ReturnType<T> : unknown;
declare type MaybeFunctionParameters<T> = T extends (...args: any[]) => any ? Parameters<T> : [];
export type Predicate<Extensions extends PlainObject> = (node: Node<unknown, Extensions>) => boolean;
type MaybeFunctionReturnType<T> = T extends (...args: any[]) => any ? ReturnType<T> : unknown;
type MaybeFunctionParameters<T> = T extends (...args: any[]) => any ? Parameters<T> : [];
export interface RootApi<Props, Context extends PlainObject = EmptyObject, Actions extends PlainObject = EmptyObject> {

@@ -44,4 +44,4 @@ readonly context: Context;

}
export declare type Node<Props, Extensions extends PlainObject = EmptyObject> = EmptyObject extends Extensions ? NodeApi<Props, Extensions> : NodeApi<Props, Extensions> & Omit<Extensions, keyof Root<any>>;
export declare type Root<Props, Context extends PlainObject = EmptyObject, Actions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject> = Node<Props, Extensions> & RootApi<Props, Context, Actions>;
export type Node<Props, Extensions extends PlainObject = EmptyObject> = EmptyObject extends Extensions ? NodeApi<Props, Extensions> : NodeApi<Props, Extensions> & Omit<Extensions, keyof Root<any>>;
export type Root<Props, Context extends PlainObject = EmptyObject, Actions extends PlainObject = EmptyObject, Extensions extends PlainObject = EmptyObject> = Node<Props, Extensions> & RootApi<Props, Context, Actions>;
export interface DebugOptions {

@@ -48,0 +48,0 @@ all?: boolean;

# @quilted/react-testing
## 0.5.20
### Patch Changes
- [#429](https://github.com/lemonmade/quilt/pull/429) [`69a5d2a1`](https://github.com/lemonmade/quilt/commit/69a5d2a1f9c2fe8d93be3157eb33506b0b8f7df7) Thanks [@lemonmade](https://github.com/lemonmade)! - Update all development dependencies to their latest versions
## 0.5.19

@@ -4,0 +10,0 @@

{
"name": "@quilted/react-testing",
"type": "module",
"version": "0.5.19",
"version": "0.5.20",
"repository": {

@@ -82,3 +82,3 @@ "type": "git",

"expect": "^27.0.0",
"preact": "^10.7.0",
"preact": "^10.11.0",
"react": "^17.0.0",

@@ -90,3 +90,3 @@ "react-dom": "^17.0.0"

"@jest/globals": "^27.0.0",
"preact": "^10.7.0",
"preact": "^10.11.0",
"react": ">=17.0.0 <18.0.0",

@@ -93,0 +93,0 @@ "react-dom": ">=17.0.0 <18.0.0"

@@ -20,5 +20,2 @@ import type {MatcherState} from 'expect';

namespace jest {
// As far as I know, this is also needed for the module augmentation
// to work.
// eslint-disable-next-line @typescript-eslint/ban-types
interface Matchers<R, T = {}> {

@@ -25,0 +22,0 @@ toContainReactHtml(text: string): void;

@@ -21,5 +21,2 @@ import type {ComponentType, Context as ReactContext} from 'react';

namespace jest {
// As far as I know, this is also needed for the module augmentation
// to work.
// eslint-disable-next-line @typescript-eslint/ban-types
interface Matchers<R, T = {}> {

@@ -26,0 +23,0 @@ toHaveReactProps(props: Partial<PropsFromNode<T>>): void;

@@ -23,3 +23,3 @@ import {stringify} from 'jest-matcher-utils';

const indent = ' '.repeat(level);
const props = Object.keys(node.props)
const props = Object.keys(node.props as any)
// we always filter out children no matter what, but unless all option

@@ -26,0 +26,0 @@ // is present we will also filter out DOM implementation details

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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