Build a Quiz Game Lab : JavaScript Objects

Hello.
I am working on this task : Build a Quiz Game
My code does not pass tests 11, 12 and 13.
I made some tests and it works fine though.
Could you please provide some tips to solve the issue. Thanks.

const questions = [];

const topic1 = {
  category: 'Sport',
  question: 'Who won the 2023 French Open?',
  choices: ['Carlos Alcaraz', 'Novak Djokovic', 'Rafael Nadal'],
  answer: 'Novak Djokovic',
};

const topic2 = {
  category: 'Politics',
  question: 'Who is the current president of the USA?',
  choices: ['Joe Biden', 'Donald Trump', 'Kamala Harris'],
  answer: 'Donald Trump',
};

const topic3 = {
  category: 'Economy',
  question: 'What does GDP stand for?',
  choices: ['Great Development Programme', 'Grand Definition of Performance', 'Gross Domestic Product'],
  answer: 'Gross Domestic Product',
};

const topic4 = {
  category: 'Geography',
  question: 'What country is the most inhabited on Earth?',
  choices: ['India', 'China', 'Indonesia'],
  answer: 'India',
};

const topic5 = {
  category: 'Cinema',
  question: 'Who directed the movie \"The Wolf of Wall Street\"?',
  choices: ['Leonardo Di Caprio', 'Quentin Tarantino', 'Martin Scorsese'],
  answer: 'Martin Scorsese',
};

questions.push(topic1, topic2, topic3, topic4, topic5);

const questionList =[];
questionList.push(topic1.question, topic2.question, topic3.question, topic4.question, topic5.question);

function getRandomQuestion(array) {
  const randomIndex = Math.floor(Math.random() * array.length);
  return array[randomIndex];
}

function getRandomComputerChoice(array) {
  const randomIndex = Math.floor(Math.random() * array.length);
  return array[randomIndex];
}

const getResults = (question, guess) => {
  const answer = questions[questionList.indexOf(question)].answer;
  if (guess === answer) {
    return "The computer's choice is correct!";
  } else {
    return `The computer's choice is wrong. The correct answer is: ${answer}`;
  }
}

const randomQuestion = getRandomQuestion(questionList)
console.log(randomQuestion);

const randomChoice = getRandomComputerChoice(questions[questionList.indexOf(randomQuestion)].choices);
console.log(randomChoice);

const result = getResults(randomQuestion, randomChoice);
console.log(result);

question is already the object, you do not need to extract it again from questionList array. Also indexOf is not intended to compare objects.

I changed a bit the code to make it pass but I still think the “user stories” descriptions to build the functions used in this assignment are not clear and even a bit confusing.
My first attempt should have been accepted. Everything just worked fine with it.

You have created a function that only works if there is a questions list, the tests want a function that is more reusable than that.

Also still indexOf is not made to work with objects
image