@html-validate/jest-config

    3.4.0 • Public • Published

    @html-validate/jest-config

    HTML-Validate jest preset.

    Jest is configured to:

    • Run tests from *.spec.[jt]s.
    • Collect coverage from .js and .ts in src and ignore tests (**/*.spec.[jt]s) and index (**/index.[jt]s).
    • Report results as junit in temp/jest.xml.
    • Transform typescript with ts-jest.
    • Ignores spec-files from Cypress.

    Install

    npm install --save-dev @html-validate/jest-config
    

    Usage

    In your package.json file:

    {
      "jest": {
        "preset": "@html-validate/jest-config"
      }
    }

    Importing HTML as string

    Importing *.html is supported by jest configuration but requires additional typescript config by creating a declaration:

    shim-html.d.ts:

    declare module "*.html" {
      const value: string;
      export default value;
    }

    Keywords

    Install

    npm i @html-validate/jest-config

    DownloadsWeekly Downloads

    1,439

    Version

    3.4.0

    License

    MIT

    Unpacked Size

    12.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • ext