Skip to content

Custom function defined in window object are no longer working. #1607

@TimMouskhelichvili

Description

@TimMouskhelichvili

💥 Regression Report

I defined some function in the global window object.

Ex. window.getAnimal = (): void => {
return 'dog';
}

I get this error:

Property 'getAnimal' does not exist on type 'Window & typeof globalThis'.

Last working version

Worked up to version: 25.4.0

Stopped working in version: 25.5.0

To Reproduce

Steps to reproduce the behavior:

Define a function in the global this object in an external file, and then try to access it in a test file.
I get an error.

envinfo

System:
    OS: Ubuntu

Npm packages:
    jest:
    ts-jest:
    typescript:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions