Skip to content

Conversation

@zehata
Copy link
Contributor

@zehata zehata commented Dec 30, 2025

Updated the validation logic in the export service

Context

Resolves https://t.me/NUSMods/13264
This was caused by the validation logic in

const timetableSchema = Joi.object().pattern(
Joi.string(),
Joi.object().pattern(Joi.string(), Joi.string()),
);
const taModulesConfigSchema = Joi.object().pattern(
Joi.string(),
Joi.array().items(Joi.array().length(2).ordered(Joi.string(), Joi.string())),
);
not updated for the updated in timetable config schema.

The systemic problem is that there is currently no test coverage for the export service. It also took a long time to fix because the readme is really outdated.

Other Information

Sample image and pdf output of the export service, showing no regression from before #4225:
My Timetable.pdf
My Timetable

Updated the validation logic in the export service
@vercel
Copy link

vercel bot commented Dec 30, 2025

@zehata is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.58%. Comparing base (988c6fd) to head (844fc23).
⚠️ Report is 155 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4277      +/-   ##
==========================================
+ Coverage   54.52%   56.58%   +2.05%     
==========================================
  Files         274      297      +23     
  Lines        6076     6924     +848     
  Branches     1455     1671     +216     
==========================================
+ Hits         3313     3918     +605     
- Misses       2763     3006     +243     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant