Skip to content

Module declaration from 3rd party modules does not work in 26.4.2 #2068

@L2jLiga

Description

@L2jLiga

💥 Regression Report

Dependabot updated an dependency to 26.4.2 and it breaks tests
I have an fastify application with fastify-oas on board (which declares fastify module and adds new properties to it

Link: https://github.com/L2jLiga/fastify-decorators/blob/b27d40146de5c04a1ca882dffd74845e4b49ebb3/examples/swagger/src/schemas.ts#L2

Last working version

Worked up to version: 26.4.1

Stopped working in version: 26.4.2

To Reproduce

Steps to reproduce the behavior:

  1. create package
  2. install fastify, fastify-oas and typescript
  3. import RouteSchema from fastify (declaration in fastify-oas)
  4. create jest test which will just import this file
  5. see error

Expected behavior

Tests are passing

Link to repo (highly encouraged)

https://github.com/L2jLiga/fastify-decorators/tree/b27d40146de5c04a1ca882dffd74845e4b49ebb3/examples/swagger

Debug log:

# content of ts-jest.log :

ts-jest.log

envinfo

System:
    OS: Windows 10 20H2 / Ubuntu 20.04

Npm packages:
    jest: 26.6.0 / 26.6.1 (latest)
    ts-jest: 26.4.2
    typescript: 4.0.3
    babel(optional): n/a

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions