Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krasch committed Dec 30, 2024
1 parent 6a460d9 commit 55acde7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions script/components/componentData.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ if (typeof process === "object" && process.env.NODE_ENV === "test") {
module.exports.initCityNameToId = initCityNameToId;
module.exports.sortByDepartureTime = sortByDepartureTime;
module.exports.humanReadableTimedelta = humanReadableTimedelta;
module.exports.dateString = dateString;
module.exports.prepareDataForCalendar = prepareDataForCalendar;
module.exports.prepareDataForPerlschnur = prepareDataForPerlschnur;
module.exports.prepareDataForMap = prepareDataForMap;
Expand Down
5 changes: 3 additions & 2 deletions tests/componentData/perlschnur.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const {
prepareDataForPerlschnur,
getColor,
humanReadableTimedelta,
dateString,
} = require("../../script/components/componentData.js");
const { Journey, JourneyCollection } = require("../../script/types/journey.js");
const { Database } = require("../../script/database.js");
Expand Down Expand Up @@ -221,7 +222,7 @@ test("prepareDataForPerlschnurMultipleConnectionsMultipleDays", function () {
station: "City 2 Main Station",
},
{
date: "(16 Oct)",
date: dateString(new Date("2024-10-16")),
time: "09:00",
station: "City 3 Main Station",
},
Expand All @@ -234,7 +235,7 @@ test("prepareDataForPerlschnurMultipleConnectionsMultipleDays", function () {
travelTime: humanReadableTimedelta(60),
stops: [
{
date: "(17 Oct)",
date: dateString(new Date("2024-10-17")),
time: "10:00",
station: "City 3 Main Station",
},
Expand Down

0 comments on commit 55acde7

Please sign in to comment.