Paracetamol.test.js🧪| #2: Testea este código JavaScript

Cristian Fernando - Jun 13 '22 - - Dev Community

Testea el siguiente código JavaScript

Dificultad: Básico

//index.js
  const resta =(a, b) => {
    return a - b;
  }

  const mult =(a, b) => {
    return a * b;
  }
  export {
    resta, mult
  }
Enter fullscreen mode Exit fullscreen mode
//operaciones.test.js
import { resta, mult as multiplicacion} from "./index.js";

test("5 - 5 es 0", () => {
  // el test esta vacío
});

test.todo("5 * 5  es 25");
Enter fullscreen mode Exit fullscreen mode

A. ❌ FAIL tests, 5 - 5 es 0, ❌ FAIL tests, 5 * 5 es 25
B. ✅ PASS tests, 5 - 5 es 0, ❌ FAIL tests, 5 * 5 es 25
C. ✅ PASS tests, 5 - 5 es 0, ✏ TODO tests, 5 * 5 es 25

Respuesta en el primer comentario.


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .