Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.29.2 breaks tests on DT #24

Closed
sandersn opened this issue Apr 26, 2023 · 2 comments
Closed

0.29.2 breaks tests on DT #24

sandersn opened this issue Apr 26, 2023 · 2 comments

Comments

@sandersn
Copy link

From https://dev.azure.com/definitelytyped/DefinitelyTyped/_build/results?buildId=155148&view=logs&j=9d906afe-3eb5-5d79-316d-86f3f3fa360c&t=09716206-abc7-5ba2-2ea2-6c6fe97a3aad&l=12352:

Error in ramda
Error: /home/vsts/work/1/s/types/ramda/test/find-tests.ts:5:30
ERROR: 5:30   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; }[]' is not assignable to parameter of type 'readonly Record<2, any>[]'.
  Property '2' is missing in type '{ a: number; }' but required in type 'Record<2, any>'.
ERROR: 6:30   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; }[]' is not assignable to parameter of type 'readonly Record<4, any>[]'.
  Property '4' is missing in type '{ a: number; }' but required in type 'Record<4, any>'.

/home/vsts/work/1/s/types/ramda/test/findIndex-tests.ts:5:35
ERROR: 5:35   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; }[]' is not assignable to parameter of type 'readonly Record<2, any>[]'.
  Property '2' is missing in type '{ a: number; }' but required in type 'Record<2, any>'.
ERROR: 6:35   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; }[]' is not assignable to parameter of type 'readonly Record<4, any>[]'.
  Property '4' is missing in type '{ a: number; }' but required in type 'Record<4, any>'.

/home/vsts/work/1/s/types/ramda/test/findLast-tests.ts:8:34
ERROR: 8:34   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; b: number; }[]' is not assignable to parameter of type 'readonly Record<1, any>[]'.
  Property '1' is missing in type '{ a: number; b: number; }' but required in type 'Record<1, any>'.
ERROR: 9:34   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; b: number; }[]' is not assignable to parameter of type 'readonly Record<4, any>[]'.
  Property '4' is missing in type '{ a: number; b: number; }' but required in type 'Record<4, any>'.

/home/vsts/work/1/s/types/ramda/test/findLastIndex-tests.ts:8:39
ERROR: 8:39   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; b: number; }[]' is not assignable to parameter of type 'readonly Record<1, any>[]'.
  Property '1' is missing in type '{ a: number; b: number; }' but required in type 'Record<1, any>'.
ERROR: 9:39   expect  TypeScript@5.1 compile error: 
Argument of type '{ a: number; b: number; }[]' is not assignable to parameter of type 'readonly Record<4, any>[]'.
  Property '4' is missing in type '{ a: number; b: number; }' but required in type 'Record<4, any>'.

/home/vsts/work/1/s/types/ramda/test/propEq-tests.ts:10:11
ERROR: 10:11  expect  TypeScript@5.1 compile error: 
Type '(obj: Record<"bar", any>) => boolean' is not assignable to type '(obj: Record<"foo", "bar">) => boolean'.
  Types of parameters 'obj' and 'obj' are incompatible.
    Property 'bar' is missing in type 'Record<"foo", "bar">' but required in type 'Record<"bar", any>'.
ERROR: 12:11  expect  TypeScript@5.1 compile error: 
Type '(obj: Record<5, any>) => boolean' is not assignable to type '(obj: Record<"baz", number>) => boolean'.
  Types of parameters 'obj' and 'obj' are incompatible.
    Property '5' is missing in type 'Record<"baz", number>' but required in type 'Record<5, any>'.
ERROR: 14:11  expect  TypeScript@5.1 compile error: 
Type '(obj: Record<"qwerty", any>) => boolean' is not assignable to type '(obj: Record<number, string>) => boolean'.
  Types of parameters 'obj' and 'obj' are incompatible.
    Property 'qwerty' is missing in type 'Record<number, string>' but required in type 'Record<"qwerty", any>'.
ERROR: 29:22  expect  TypeScript@5.1 compile error: 
Argument of type 'Obj' is not assignable to parameter of type 'Record<1, any>'.
  Property '1' is missing in type 'Obj' but required in type 'Record<1, any>'.
ERROR: 30:22  expect  TypeScript@5.1 compile error: 
Argument of type 'Obj' is not assignable to parameter of type 'Record<4, any>'.
  Property '4' is missing in type 'Obj' but required in type 'Record<4, any>'.
ERROR: 43:28  expect  TypeScript@5.1 compile error: 
Argument of type 'A' is not assignable to parameter of type 'Record<"", any>'.
  Property '""' is missing in type 'A' but required in type 'Record<"", any>'.
@sandersn
Copy link
Author

I'm surprised that not all the tests from DT have been copied here.

@Harris-Miller
Copy link
Collaborator

@sandersn Those tests broke specifically because propEq had it's argument order swapped between 0.28.0 and 0.29.0. The most recent release of types-ramda included typing updates to reflect that change. They have since been updated in this MR: DefinitelyTyped/DefinitelyTyped#65286

I'm surprised that not all the tests from DT have been copied here.

That can't. At least not copied and pasted. How the tests work in DT is kind of special to DT. That teams has suggested that we use thetsd package to test here

We specifically kept the existing testing in @types/ramda to catch regressions. We do plan to, overtime, manually migrate over all the tests to be re-written with tsd. See this issue: #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants