Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR para la Mejora de Tests en M7T19 (Issue #70) #74

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions C7 Arrays/tests/M7T19.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
const multiplicarArgumentos = require('../ejercicios/19');

test('Debe retornar el producto de los argumentos', function () {
const product = multiplicarArgumentos(5, 5);
const product2 = multiplicarArgumentos();
const product3 = multiplicarArgumentos(3, 3, 3, 3);
const product4 = multiplicarArgumentos(1);
const product5 = multiplicarArgumentos(10, 0, 10);
expect(product).toBe(25);
expect(product2).toBe(0);
expect(product3).toBe(81);
expect(product4).toBe(1);
expect(product5).toBe(0);
const product = multiplicarArgumentos(5, 5);
const product2 = multiplicarArgumentos(10, 0, 10);
const product3 = multiplicarArgumentos(3, 3, 3, 3);
expect(product).toBe(25);
expect(product2).toBe(0);
expect(product3).toBe(81);
});
test('Debe retornar un solo elemento, cuando hay un solo argumento', function () {
const product = multiplicarArgumentos(1);
expect(product).toBe(1);
});
test('Debe retornar 0 cuando no hay argumentos', function () {
const product = multiplicarArgumentos();
expect(product).toBe(0);
});