drazenbebic / pokezerrb-discord-bot

0 stars 0 forks source link

Added TypeScript support. #11

Closed drazenbebic closed 2 years ago

drazenbebic commented 2 years ago

Resolves #1 Resolves #7 Resolves #10

drazenbebic commented 2 years ago

@tbal999 I think the tests are failing because they haven't been written for TypeScript. Can you take a look and update this branch please?

drazenbebic commented 2 years ago

@tbal999 I reran the checks and they failed 😭

I think we need to do a bit more. Let me know if you want me to take a look with you. Here's some additional info:

https://jestjs.io/docs/getting-started#using-typescript

tbal999 commented 2 years ago

I just renamed the file to .ts hoping it would work.

Looks like it's more complex than that. I will refer to the link you shared & learn more about typescript :)

drazenbebic commented 2 years ago

One thing I noticed right away is that the instantiation of the Pokedex is missing. Somewhere in your test, before you call any methods on the Pokedex, you need to instantiate it like so:

const Pokedex = new PokedexModule();

Had to rename it to PokedexModule so the there's no naming conflict.