3

Our project uses Cypress to run e2e tests. We have 5 different suites that run twice a day, at different times.

My problem is that we can currently introduce compilation problems and we won't find out until we run the e2e tests, which is after we've committed. I would like to be able to build my Cypress TypeScript to make sure it doesn't have any type errors so that we can prevent pushing to main.

I have not been able to find some configuration that would compile all the TypeScript but would not run the tests. Has anyone been able to achieve such configuration?

2
  • 2
    Cant you compile TS regularly? Why you need cypress to do it? If missing some global variables just install the Cypress types Commented Sep 21, 2021 at 17:29
  • @RazLuvaton We use cucumber and my (unfounded) concern was that Cypress converts the feature files into JavaScript and I thought I would not be compiling the full code. You are correct though, that I don't need to compile the generated code from cucumber feature files. Commented Sep 24, 2021 at 13:40

1 Answer 1

1

It turns out to be as simple as @RazLuvaton mentioned. Just run tsc on your own. You can even pass the --no-emit if, like me, you just want check types.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.