Change:
When testing one camper's code it fails some tests unless I increase all the delays to 1000ms, I tested with 500ms but that was not enough. I also saw the example project fail a test but it does pass more consistently (my guess is it is just faster with fewer async functions). To be on the safe side we should have a longer delay. I know 1000ms is a lot but better safe than sorry. Tests: Valid code should not fail because of "timing" issues. No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] Forum:
As this is a bug with a certificate project I the showstopper label.

Discussion:
Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding! <ins> **Note:** When running the tests there will be a slight delay. Please wait a few seconds to allow the tests to finish. Do not refresh the page before they are done. </ins> # --hints-- You should have an `input` element with an `id` of `search-input` and is **required**.

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/red'); // Fetch from proxy to simulate network delay if (!res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow the alert to trigger </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow the alert to trigger </ins> assert.include(['pokémon not found', 'pokemon not found'], alertMessage.trim().replace(/[.,?!]+$/g, '').toLowerCase()); }

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/pikachu'); // Fetch from proxy to simulate network delay if (res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow UI to update </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow UI to update </ins> const pokemonName = document.getElementById('pokemon-name'); const pokemonID = document.getElementById('pokemon-id');

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/pikachu'); // Fetch from proxy to simulate network delay if (res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow UI to update </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow UI to update </ins> const sprite = document.getElementById('sprite'); assert.isTrue(sprite.src.endsWith('sprites/pokemon/25.png'));

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/pikachu'); // Fetch from proxy to simulate network delay if (res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow UI to update </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow UI to update </ins> assert.lengthOf(typesEl.children, 1); assert.strictEqual(typesEl?.children[0]?.innerText.trim().toLowerCase(), 'electric');

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/94'); // Fetch from proxy to simulate network delay if (res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow UI to update </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow UI to update </ins> const pokemonName = document.getElementById('pokemon-name'); const pokemonID = document.getElementById('pokemon-id');

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/94'); // Fetch from proxy to simulate network delay if (res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow UI to update </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow UI to update </ins> const sprite = document.getElementById('sprite'); assert.isTrue(sprite.src.endsWith('sprites/pokemon/94.png'));

const res = await fetch('https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/94'); // Fetch from proxy to simulate network delay if (res.ok) { <del> await new Promise(resolve => setTimeout(resolve, 50)); // Brief additional delay to allow UI to update </del> <ins> await new Promise(resolve => setTimeout(resolve, 1000)); // Additional delay to allow UI to update </ins> const targetTypes = ['ghost', 'poison']; assert.lengthOf(typesEl.children, 2);