question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TestCafe can't compile TypeScript projects that have some specific options in tsconfig.json

See original GitHub issue

What is your Test Scenario?

Run tests written in TypeScript and enable the following TypeScript options in tsconfig.json:

"declaration"
"sourceMap"
"noEmit"
"noEmitHelpers"
"mapRoot"

And probably the following options too:

"rootDir"
"sourceRoot"
"lib"
"typeRoots"
"types"

What is the Current behavior?

TestCafe can’t compile test files and shows an error about conflicting options.

What is the Expected behavior?

Successful compilation.

What is your web application and your TestCafe test code?

Your website URL (or attach your complete example):

Your complete test code (or attach your test files):
 
Your complete configuration file (if any):

Your complete test report:

Screenshots:

Steps to Reproduce:

  1. Go to my website …
  2. Execute this command…
  3. See the error…

Your Environment details:

  • testcafe version: 1.3.1-rc.1
  • node.js version:
  • command-line arguments:
  • browser name and version:
  • platform and version:
  • other:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
orihomiecommented, May 7, 2020

I’ve worked around using --ts-config-path and passing

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true
  }
}

onto testcafe launch script.

0reactions
github-actions[bot]commented, May 18, 2021

We’re closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript and CoffeeScript | Concepts | Guides | Docs
TestCafe allows you to write tests with TypeScript - a typed superset of JavaScript. ... You do not need to manually compile TypeScript...
Read more >
A brand new website interface for an even better experience!
TestCafe can't compile TypeScript projects that have some specific options in tsconfig.json.
Read more >
Testcafe not running with typescript when installed locally
This is a yarn project using typescript v3.7.3 and I am using testcafe v1.9.1 . To install I ran: yarn add --dev testcafe....
Read more >
Testcafe script has syntax error in typescript
Hi, I am getting a syntax error when I write the script as attached below. But somehow, I get typescript syntax error like...
Read more >
TypeScript - Cypress Documentation
You might need to include the *.d.ts in the include options in any tsconfig.json files in your project for TypeScript to pick up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found