Redux challenge failing tests

Hi, I’m working on the Redux course challenge Extract State Logic to Redux and the tests keep failing on:

The store should exist and have an initial state set to an empty array.
Dispatching addMessage against the store should immutably add a new message to the array of messages held in state.

My code:

// Define ADD, addMessage(), messageReducer(), and store here:
const ADD = "ADD";
const initialState = [];

function addMessage(message) {
  return ({
    type: ADD,
    message: message

function messageReducer(state = initialState, action) {
  switch (action.type) {
    case ADD: {
      return [...state, action.message]
      return state;

const store = Redux.createStore(messageReducer);
let hi = "hi"


[ 'hi' ]
[ 'hi', 'goodbye' ]

I can’t see why. I’ve tried setting state = initialState object, to [] empty array, setting state in Redux.createStore(reducer, []) but it keeps failing on these two tests. Also I’m sure I’m creating a shallow copy of those variables when I return the new state, right?
Just to add I comment out my console.log’s when I run the tests.

Remove all the code you added after the store creation.