Hallker
Hallker

Reputation: 1

How to define global hooks in TestCafe using TypeScript?

In documentation it is recommended to use js configuration file in order to define a global hook, however this is a problem for TypeScript solution.

I wasn't able to use my TS classes/functions in .js configuration file and it doesn't seem to be possible to create a .ts configuration file.

So my question is, how am I supposed to use global hooks with TS, when I can't reference my own code. Is this a mistake on my part or it is simply issue of TestCafe not having support for .ts config file yet.

Upvotes: 0

Views: 182

Answers (1)

Alexey Popov
Alexey Popov

Reputation: 1047

Could you please share more detailed information about your use case? Do you want to import classes or functions from *.ts files and use them or use TS in the config file?

Upvotes: 1

Related Questions