File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 22
33const main = require ( '../main' ) ;
44
5+ test ( 'addNumbers function adds two numbers correctly' , ( ) => {
6+ expect ( main . addNumbers ( 2 , 3 ) ) . toBe ( 5 ) ;
7+ } ) ;
8+
9+ test ( 'subtractNumbers function subtracts two numbers correctly' , ( ) => {
10+ expect ( main . subtractNumbers ( 5 , 2 ) ) . toBe ( 3 ) ;
11+ } ) ;
512
613// Add more tests for other functions if needed
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const unusedVariable = 'This variable is not used';
2020const missingSemicolon = 'This line is missing a semicolon' ;
2121
2222// Error: Using an undefined variable
23- console . log ( undefinedVariable ) ;
23+ // console.log(undefinedVariable);
2424
2525// Error: Trying to reassign a constant
2626const constantValue = 42 ;
You can’t perform that action at this time.
0 commit comments