Rewire : How to access an exported class and a function and test them?

149 views Asked by At

I have a class and a function in one file

export class MainClass{
....
}

export function test_function(){}

Previously, I just had the test_function exported and could easily test it using

 rewire('file.ts').__get__("test_function")

How can I access the class to test its functions? (Preferably not moving the class to another file)

0

There are 0 answers