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.

test/ dir is in `include`, non-spec TS files (e.g. test utils) break build with v0.13 rootDir: `./src`

See original GitHub issue

Current Behavior

Prior to v0.13 #504 , I could put a file into my test folder that contained utility code for tests and it would get compiled without a problem.

test/TestUtils.tsx

Now, when I tsdx build, I see this error:

rpt2: options error TS6059: File '/mui-rff/test/TestUtils.tsx' is not under 'rootDir' '/mui-rff/src'. 'rootDir' is expected to contain all source files.

Expected behavior

I have a place to put utility code for tests.

Suggested solution(s)

No idea, but you have a list of 3rd parties using this project and it would be nice if you would start to test future versions of tsdx against these projects to see if you break peoples stuff and can then use that to find out how to tell people how to fix their broken stuff.

Your environment

Software Version(s)
TSDX v0.13
TypeScript 3.8.3
npm/Yarn 6.13.7 / 1.22.4
Node v13.11.0
Operating System OSX Catalina

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:43 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
lookfirstcommented, Mar 24, 2020

For the record, I wasn’t poking at TSDX, I was poking at users of TSDX. 😉

2reactions
lookfirstcommented, Mar 23, 2020

I do notice that the build is faster now. =)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting up tsconfig with spec/test folder - typescript
I ended up defining multiple config files and use extends to simplify them. Say I have two files: tsconfig.json and tsconfig.build.json
Read more >
Guides | Vue Test Utils
Vue Test Utils (VTU) is a set of utility functions aimed to simplify testing Vue.js components. It provides some methods to mount and...
Read more >
Configuring Jest
Jest's configuration can be defined in the `package.json` file of your project, or through a `jest.config.js` file or through the `--config ` option....
Read more >
test suite failed to run jest encountered an unexpected token
This means that a file is not transformed through TypeScript compiler, e.g. because it is a JS file with TS syntax, or it...
Read more >
Guide to Unit Testing Vue Components
Check the code coverage of your unit tests; Develop a well-structured unit test file for testing a Vue component. Why Unit Test? In...
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