JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 67381
  • Score
    100M100P100Q160470F
  • License MIT

TypeScript definitions for chai-dom

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/chai-dom) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/chai-dom

    Summary

    This package contains type definitions for chai-dom (https://github.com/nathanboktae/chai-dom).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chai-dom.

    index.d.ts

    // Type definitions for chai-dom 1.11
    // Project: https://github.com/nathanboktae/chai-dom
    // Definitions by: Matt Lewis <https://github.com/mattlewis92>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 3.0
    
    /// <reference types="chai" />
    
    declare namespace Chai {
        interface Assertion {
            attr(name: string, value?: string): Assertion;
    
            attribute(name: string, value?: string): Assertion;
    
            class(className: string | RegExp): Assertion;
    
            id(id: string): Assertion;
    
            html(html: string): Assertion;
    
            text(text: string | string[]): Assertion;
    
            value(text: string): Assertion;
    
            style(property: string, value: string): Assertion;
    
            empty: Assertion;
    
            // exist, length, and contain are already defined in @types/chai and have the
            // same type or a more general type, so don't need to be re-declared even though
            // the implementation is different
    
            descendant(element: string | HTMLElement): Assertion;
    
            descendants(selector: string): Assertion;
    
            displayed: Assertion;
    
            trimmed: Assertion;
    
            rendered: Assertion;
    
            visible: Assertion;
    
            tagName(name: string): Assertion;
    
            focus: Assertion;
    
            checked: Assertion;
        }
    
        interface Include {
            text(text: string | string[]): Assertion;
    
            html(text: string | string[]): Assertion;
        }
    
        interface Match {
            (selector: string): Assertion;
        }
    }
    
    declare module "chai-dom" {
        const chaiDom: Chai.ChaiPlugin;
        export = chaiDom;
    }
    

    Additional Details

    • Last updated: Mon, 04 Sep 2023 15:40:40 GMT
    • Dependencies: @types/chai
    • Global values: none

    Credits

    These definitions were written by Matt Lewis.