Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make project compile without errors for both unit and e2e #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hotell
Copy link

@Hotell Hotell commented Aug 7, 2017

This fixes tsc errors so whole project with all code is compiled without errors, this is the demanded behaviour, it has one major caveat though -> testcafe's handling of TSC

because testcafe is not consuming user's provided tsconfig.json it will fail ofc, because there is no "skipLibCheck": true in testcafe's code.

Otherwise this is the "only right" solution how to compile whole project if Mocha/Testcafe is used ( which is needed , why ? -->

  • you may need to reuse some functions/types from source code src/ ( this makes also TS very important, everything has 100% type safe contract implementation <--> tests, yummy )

Why this (works) ?:

  • typescript type system is structural, and because both testcafe and mocha have same/similar type structure of test function, typescript consumes this with little issues which are resolved via skipLibCheck

Overall summary:

The correct way?:

  • having base tsconfig for source and unit test compilation
  • extending base tsconfig which excludes unit tests and includes e2e tests
    --> this is still not doable, because as I've mentioned, testcafe is unable to consume users tsconfig :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant