File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,10 @@ describe("Question", () => {
8686 const question = new Question ( "test" , testChoices , "test" ) ;
8787 // Call the shuffleChoices() method on the Question object
8888 question . shuffleChoices ( ) ;
89-
89+
9090 // Check that the 'choices' property of the Question object is not equal to the test choices array (i.e. it has been changed/shuffled)
91- expect ( question . choices ) . not . toEqual ( testChoices ) ;
91+ expect ( question . choices ) . not . toEqual ( [ "choice1" , "choice2" , "choice3" ] ) ;
92+ expect ( question . choices . length ) . toEqual ( 3 ) ;
9293 } ) ;
9394 } ) ;
9495} ) ;
Original file line number Diff line number Diff line change @@ -134,7 +134,8 @@ describe("Quiz", () => {
134134 // Call the shuffleQuestions() method to shuffle the questions array in the quiz
135135 quiz . shuffleQuestions ( ) ;
136136 // Check if the questions array is not equal to the original array (it has been changed/shuffled)
137- expect ( quiz . questions ) . not . toEqual ( testQuestions ) ;
137+ expect ( quiz . questions ) . not . toEqual ( [ "question1" , "question2" , "question3" ] ) ;
138+ expect ( quiz . questions . length ) . toEqual ( 3 ) ;
138139 } ) ;
139140 } ) ;
140141
You can’t perform that action at this time.
0 commit comments