From 2889de7f0c2d587a17fbd322af57c29e84238620 Mon Sep 17 00:00:00 2001
From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de>
Date: Thu, 16 Jan 2025 12:22:14 +0100
Subject: [PATCH] update parcel
---
stundenplan/test/lib/Lecture-test.js | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/stundenplan/test/lib/Lecture-test.js b/stundenplan/test/lib/Lecture-test.js
index 387f93f..ffb77ec 100644
--- a/stundenplan/test/lib/Lecture-test.js
+++ b/stundenplan/test/lib/Lecture-test.js
@@ -4,7 +4,7 @@
test("Lecture: constructor:", t=>{
const name = "Informatic", ects = 5, sws = 3;
- let informatic = new Lecture(name, ects, sws, );
+ const informatic = new Lecture(name, ects, sws, );
t.is(informatic.name, name);
t.is(informatic.sws, sws);
t.is(informatic.ects, ects);
@@ -12,15 +12,15 @@
test("Lecture: get Effort", t =>{
- let js = new Lecture("JavaScript", 5, 4);
- let effort = js.effortPerWeek(15);
+ const js = new Lecture("JavaScript", 5, 4);
+ const effort = js.effortPerWeek(15);
t.is(effort, 7);
- let lectures = [
+ const lectures = [
new Lecture("Informatik 1", 5, 4),
new Lecture("Programmierung 1", 8, 5),
new Lecture("JavaScript", 5, 4)
];
- let effortOfWeek = lectures.reduce( (acc, l) => l.effortPerWeek(15) + acc, 0);
+ const effortOfWeek = lectures.reduce( (acc, l) => l.effortPerWeek(15) + acc, 0);
const expected = 26.25;
const tolerance = 0.01;
t.truthy( Math.abs(effortOfWeek - expected) < tolerance );
@@ -30,7 +30,7 @@
const name = "JavaScript",
ects = 5,
sws = 4;
- let js = new Lecture(name, ects, sws);
+ const js = new Lecture(name, ects, sws);
t.is(js.name, name);
t.is(js.ects, ects);
t.is(js.sws, sws);
@@ -40,7 +40,7 @@
const name = "JavaScript",
ects = 5,
sws = 4;
- let js = new Lecture("name", 1, 3);
+ const js = new Lecture("name", 1, 3);
js.ects = ects;
js.sws = sws;
--
Gitblit v1.10.0