Published On Sep 16, 2021
TypeScript for Beginners - • TypeScript for Beginners
Cypress Quiz - https://automationstepbystep.com/quiz...
Stories by Raghav - https://automationstepbystep.com/stor...
Hi, In this video, we will learn How to use Cypress with TypeScript
Prerequisites
IDE (VS Code) is available
Support for JavaScript and TypeScript added on VS Code
Node JS
Step 1 - Create a new folder
Step 2 - Open folder in VS Code
Step 3 - Run commands
npm init -y
npm install cypress
npm install typescript
Step 4 - initialize a new tsconfig.json file using the command
npx tsc --init --types cypress --lib dom,es6
This ensures that types for cypress are accessible by typescript
These types depend on dom and es6, so we pass them as lib option to typescript
Step 5 - Run command
npx cypress open
Step 6 - Under cypress/integration folder create a test file basic.ts
Step 7 - Add test code | Run and verify
Join Automation Step By Step channel: https://www.youtube.com/automationste...
#CypressWithTypeScript
Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can
If my work has helped you, consider helping any animal near you, in any way you can
to save the cows - https://radhasurabhi.com/donate/
Never Stop Learning
Raghav