From 4e9051235d715f6f9cc36ae54878283f074e1d35 Mon Sep 17 00:00:00 2001 From: Lucas Thenert Date: Fri, 27 Jan 2023 12:12:31 +0100 Subject: [PATCH] Test Full House erstellt --- kniffel/inc/fullHouse.js | 1 + kniffel/test/test_fullHouse.test.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 kniffel/test/test_fullHouse.test.js diff --git a/kniffel/inc/fullHouse.js b/kniffel/inc/fullHouse.js index 8491ce2..20bc6a7 100644 --- a/kniffel/inc/fullHouse.js +++ b/kniffel/inc/fullHouse.js @@ -11,3 +11,4 @@ function fullHouse(wuerfelArr){ return 0; } +module.exports = fullHouse; \ No newline at end of file diff --git a/kniffel/test/test_fullHouse.test.js b/kniffel/test/test_fullHouse.test.js new file mode 100644 index 0000000..5f98d00 --- /dev/null +++ b/kniffel/test/test_fullHouse.test.js @@ -0,0 +1,15 @@ +const fullHouse = require('../inc/fullHouse'); + + +//Eine Test Gruppe, mit mehreren Tests +describe('tests kniffel', () => { + + it('teste ob zwei und drei gleiche Augenzahlen existieren (Full House)', ()=>{ + + //Vergleiche Ist- und Sollergebnis + expect(fullHouse([2, 2, 3, 2, 3])).toBe(25); + + }); + + +})