Cargo Manifest Validator - Build a Cargo Manifest Validator

This is safe case check i.e. if manifest[key] has value then only call .toLowerCase() and there is no case asking for 0 weight check as if 0kg it will be 0lb(all test cases are passing)

And even though check for weight = 0, the same stuck at test 15.

How do you mean flipped checks?

Are there any hidden test cases?

  • weight: a positive number representing the cargo’s weight.
  • unit: a string describing the units for the cargo’s weight property (either "kg" for kilograms or "lb" for pounds).

So, you think ‘LB’ is a valid unit? And you think 0 is a positive number? :face_with_raised_eyebrow:

Your validation checks are not done in the same order as your object’s properties, so your resulting validation object shows hazmat before unit.

It passed, thank you!