You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ion-js has two directories with source code: src and test. Because it uses mocha+ts-node for its unit tests, the code in test is never actually compiled; ts-node interprets it dynamically as part of the mocha run. Because of this, there's no need to include test explicitly in our tsconfig.json. This led us to have a rootDir of "src".
Now that our tests are a bit more comprehensive/elaborate, it would be good to extract commonly referenced functions/values into reusable files in test. However, attempting to do this causes WebStorm to throw an error:
TS6059: .... `rootDir` is expected to contain all source files.
This occurs because test is not in the rootDir, src. This error only occurs in the WebStorm UI, which doesn't understand that we're using ts-node to run the contents of the test directory out-of-band. We can change src, but depending on how we do that it may impact the structure of the dist directory. We should investigate whether a prescribed solution exists.
The text was updated successfully, but these errors were encountered:
ion-js
has two directories with source code:src
andtest
. Because it usesmocha
+ts-node
for its unit tests, the code intest
is never actually compiled;ts-node
interprets it dynamically as part of themocha
run. Because of this, there's no need to includetest
explicitly in ourtsconfig.json
. This led us to have arootDir
of"src"
.Now that our tests are a bit more comprehensive/elaborate, it would be good to extract commonly referenced functions/values into reusable files in
test
. However, attempting to do this causes WebStorm to throw an error:This occurs because
test
is not in therootDir
,src
. This error only occurs in the WebStorm UI, which doesn't understand that we're usingts-node
to run the contents of thetest
directory out-of-band. We can changesrc
, but depending on how we do that it may impact the structure of thedist
directory. We should investigate whether a prescribed solution exists.The text was updated successfully, but these errors were encountered: