Skip to content

Some typescript tests are failing #4769

@lholmquist

Description

@lholmquist

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.17.0

Plugin version

No response

Node.js version

16.15.1

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

12.6.5

Description

When running the tests, specifically the test:typescript script, i'm seeing 31 errors:

> tsc test/types/import.ts && tsd


  test/types/type-provider.test-d.ts:114:4
  ✖  114:4   Parameter type number | undefined is not identical to argument type any.                            
  ✖  114:35  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  114:35  req.body is of type unknown.                                                                        
  ✖  115:4   Parameter type string | undefined is not identical to argument type any.                            
  ✖  115:35  req.body is of type unknown.                                                                        
  ✖  116:4   Parameter type boolean | undefined is not identical to argument type any.                           
  ✖  116:36  req.body is of type unknown.                                                                        
  ✖  141:4   Parameter type number | undefined is not identical to argument type any.                            
  ✖  141:35  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  141:35  req.body is of type unknown.                                                                        
  ✖  142:4   Parameter type string | undefined is not identical to argument type any.                            
  ✖  142:35  req.body is of type unknown.                                                                        
  ✖  143:4   Parameter type boolean | undefined is not identical to argument type any.                           
  ✖  143:36  req.body is of type unknown.                                                                        
  ✖  515:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  526:2   Type instantiation is excessively deep and possibly infinite.                                       
  ✖  537:0   Type instantiation is excessively deep and possibly infinite.                                       
  ✖  537:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  567:0   Type instantiation is excessively deep and possibly infinite.                                       
  ✖  567:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  567:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  587:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  587:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  615:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  640:17  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  673:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  673:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  690:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  690:12  Type instantiation is excessively deep and possibly infinite.                                       
  ✖  704:0   Found an error that tsd does not currently support (ts2589), consider creating an issue on GitHub.  
  ✖  704:12  Type instantiation is excessively deep and possibly infinite.                                       

  31 errors

We've added fastify to our test suite that tests this module(and others) on different Fedora and RHEL platforms and started to see this error last night. related issue: sclorg/s2i-nodejs-container#391

I've also run this locally on my macos laptop with Node 16(node 18 also) and getting the same thing.

I thought maybe it was happening just with the last HEAD, but i've checked out v4.17.0, which had been working previously and i'm seeing these failures there too

Steps to Reproduce

  • clone the repo
  • npm install
  • npm run test

Expected Behavior

All the tests to pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedHelp the community by contributing to this issuetypescriptTypeScript related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions