sorbet-typed icon indicating copy to clipboard operation
sorbet-typed copied to clipboard

Set up spec for the rbi

Open hdoan741 opened this issue 5 years ago • 2 comments

There should be a way to test the rbi so that reviewing PR is easier. I expect it would be:

  • Set up sorbet in this repo
  • Set up structure to add testcase & output from srb tc

When people add rbi, they should also add test cases & expected output

hdoan741 avatar Jul 03 '19 00:07 hdoan741

I was curious how DefinitelyTyped does this, and it looks like they have a tests file for every package that includes some basic code for the package, to make sure it passes static type checking.

e.g. actioncable/index.d.ts and actioncable-tests.ts

That seems like the simplest solution to me.

connorshea avatar Jul 03 '19 03:07 connorshea

Can we run a rbi-based "lint" as a first step at testing?

jasnow avatar Jul 14 '19 12:07 jasnow