Pokemon Search App- 1 test case failing

I am failing just 1 test case: When the #search-input element contains the value Red and the #search-button element is clicked, an alert should appear with the text "Pokémon not found" .
My error is very strange as the app works as intended. Searching with a text input of “Red” does throw the intended alert during testing (Both on my local machine and FCC sandbox). However the test case won’t pass. I have tripled checked everything, made sure there are no typos and that my logic is correct. But no matter what, it won’t simply pass.
Here’s my script.js file:

const pokemonDataUrl = "https://pokeapi-proxy.freecodecamp.rocks/api/pokemon";
let allPokemonData;
let currentPokemon;
const numberRegex = /^\d+$/;

const input = document.getElementById("search-input");
const searchBtn = document.getElementById("search-button");
const pokemon_id = document.getElementById("pokemon-id");
const pokemon_name = document.getElementById("pokemon-name");
const pokemon_weight = document.getElementById("weight");
const pokemon_height = document.getElementById("height");
const pokemon_image = document.getElementById("pokemon-image");
const pokemon_types = document.getElementById("types");
const hp = document.getElementById("hp");
const attack = document.getElementById("attack");
const defense = document.getElementById("defense");
const special_attack = document.getElementById("special-attack");
const special_defense = document.getElementById("special-defense");
const speed = document.getElementById("speed");

const fetchAllData = async () => {
    try{
        const res = await fetch(pokemonDataUrl);
        const data = await res.json();
        allPokemonData = data.results;
    }
    catch (err){
        console.log(err);
    }
}

fetchAllData();

const fetchPokemonData = async (url) => {
    try{
        const res = await fetch(url);
        const pokemon_data = await res.json();
        currentPokemon = pokemon_data;
    }
    catch (err){
        console.log(err);
    }
}

const searchForPokemon = input_value => {
    input_value = input_value.toLowerCase();
    if(input_value.match(numberRegex)){ // input is of the type: pokemon_id
       if(allPokemonData.some(pokemon => pokemon.id == Number(input_value))){
        fetchPokemonData(pokemonDataUrl+`/${input_value}`);
        return true;
       }
       return false;
    }
    else{ // input is of the type: name
        if(allPokemonData.some(pokemon => pokemon.name == input_value)){
            fetchPokemonData(pokemonDataUrl+`/${input_value}`);
            return true;
        }
        return false;
    }
}

const handleSearchResult = () => {
    let input_value = input.value;
    let isPokemonPresent = searchForPokemon(input_value);
    if(isPokemonPresent){
        console.log("The cuurent pokemon data is: ", currentPokemon);
        setTimeout(() => {
            // Fill Pokemon name and id
            pokemon_name.textContent = currentPokemon.name.toUpperCase();
            pokemon_id.textContent = "#" + currentPokemon.id;
            // Fill Pokemon weight and height
            pokemon_weight.textContent = "Weight: " + currentPokemon.weight;
            pokemon_height.textContent = "Height: " + currentPokemon.height;
            // Fill Pokemon image
            pokemon_image.innerHTML = `<img id="sprite" src="${currentPokemon.sprites.front_default}" alt="front of ${currentPokemon.name}">`
            // Fill Pokemon types
            pokemon_types.innerHTML = ``;
            currentPokemon.types.forEach(value => {
                pokemon_types.innerHTML += `<span class="type ${value.type.name}">${value.type.name.toUpperCase()}</span>`
            })
            // Fill Pokemon stats table
            hp.textContent = currentPokemon.stats[0].base_stat;
            attack.textContent = currentPokemon.stats[1].base_stat;
            defense.textContent = currentPokemon.stats[2].base_stat;
            special_attack.textContent = currentPokemon.stats[3].base_stat;
            special_defense.textContent = currentPokemon.stats[4].base_stat;
            speed.textContent = currentPokemon.stats[5].base_stat;
        }, 500)
    }
    else{
        alert("Pokémon not found");
    }
}

searchBtn.addEventListener("click", handleSearchResult);

can you share also your html?