Skip to main content

Expections

Expections are the types in ChitChatjs that you can expect. In our tutorial for a simple test, we expected a num by using the function expectToBeNum(num). But that's only one type, and if you try to put a different type in there, ChitChatjs will throw an error at you. But, if you use to corresponding type, ChitChatjs will not throw an error at you. Here are all of the functions right now to their corresponding types(new functions for types will come out every so often):

  • expectToBeNum
  • expectToBeText
  • expectToBeBool
warning

Make sure to follow proper types, or your whole test might be ruined!

While there are a bunch of other types, these are the ones that are currently in ChitChat, and new ones are always coming out!

Make sure to match them up with the correct type though, or else ChitChat will throw an error at you.