bahmutov / add-typescript-to-cypress

Quickly adds TypeScript spec support to Cypress
https://github.com/bahmutov/test-add-typescript-to-cypress
107 stars 6 forks source link

When TypeScript code not compiling, Cypress crashes #105

Open yonigibbs opened 4 years ago

yonigibbs commented 4 years ago

Current behavior:

If a test written in TypeScript is saved with the code not compiling, it causes the window containing the test to crash, and the main Cypress window to show the following:

TypeScript crash screenshot

This does not occur with JavaScript files left in an invalid state.

Desired behavior:

TypeScript files with invalid code should be handled in same way as JavaScript files are, i.e. the window containing the test should be left open, and an explanatory message should be shown, e.g.

JavaScript error handled screenshot

Steps to reproduce: (app code and test code)

A repo with instructions on how to reproduce is available here: https://github.com/yonigibbs/cypress-typescript-crash

Versions