I used to compile e2e protractor tests written in TS before run, but now I figured out how to compile ts files in run-time -- ts-node appeared to be a great tool for that. As many articles say, I registered ts-node in protractor config file, so that I can run my test specs as if they are .ts files and they will be compiled in tun-time. Something like this:
beforeLaunch: () => {
require('ts-node').register({
compilerOptions: {
module: 'commonjs'
},
disableWarnings: true,
fast: true
});
},
That's great. But all cases I met included examples with .js config files --> you don't need to compile config files, but all specs can be in TS and will be compiled with ts-node.
What I wish to have is having all my files in TypeScript: both configs and specs. How can I run my protractor tests giving config.ts and having specs.ts in there?
Something like protractor ts-node config.ts
would be just awesome.