basic-testing's People
Forkers
helgaathame janaahurtsova emp74ark kosta4310 nick-hard-worker ekalape itboo ya6 happycrew istairina petro1909 vladimircherepanov igoosiatin ulianasavi alexeikozlovskiy hallovarvara ramanhupalenka pavelsashnikov eradionov belspirit theericfrost margarita-sh oibioib yakovlya alexandr2075 ichmen andrej-a andron13 aliaksandr-bychyk barysbarysau terra456 squidawg katsiaryna-andrabaila lordofthevillage martapejkowska evgeniyaanisko gandigap valr0lipsk sheshkopavel deguzbelarus dziana-babrova yakravtsova andreizaretski agentra aleksandrdemidovich milothea motoblock feelfaque semoleg1986 evgeniikolesnikov tomas-zagorskis olenaweb balashovama darya-startsava tuto4ki brbrov aliaksandrpatapeika anastasiyahaidanovich khraksmamtsov skuzema oksanafedotova anutaguzova katya-petrova kirilldemyanenko sanich123 alekspaty kanoplich labatsevich kristinabychenok allerk pavelarabei artkon necket kate0305 vktrenokh top-aleksei eratiani 4ebula anast-ananko ledich19 boffin-ux helenaish gnomepman koctia isynthetica viktorsolovyev disembow alexandrklychnikov edumgtk2020 trenkenshu sekaa4 skave-a milana1726 dzmitrysh elianta awlmax alexandravalke faz-r strei-foxflashbacks alyakavalenkabasic-testing's Issues
Unreachable default case in simpleCalculator function
Current Behavior:
The default case in the switch statement of the simpleCalculator function throws an error, even though it is unreachable due to the preceding validation logic.
basic-testing/src/01-simple-tests/index.ts
Lines 38 to 39 in c5b0763
Expected Behavior:
The default case and the associated error throw statement are unnecessary and can be safely removed.
Since the isInputValid function already checks the validity of the input and returns false if it's invalid, the control flow will never reach the default case.
Additional Context:
The purpose of the isInputValid function is to validate the input before performing calculations. When the control flow reaches the switch statement, it indicates that the input is valid, and there is no need for the default case.
Removing the default case helps achieve 100% coverage:
File | % Stmts | % Branch | % Funcs | % Lines |
---|---|---|---|---|
All files | 100 | 100 | 100 | 100 |
01-simple-tests | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
Please address this issue by removing the default case and the associated error throw. Thank you.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.