diff --git a/curriculum/challenges/english/blocks/lab-cargo-manifest-validator/69a56b5069ca99f7317e6e19.md b/curriculum/challenges/english/blocks/lab-cargo-manifest-validator/69a56b5069ca99f7317e6e19.md index 7ed0a6f8a7e..6ca69f85f64 100644 --- a/curriculum/challenges/english/blocks/lab-cargo-manifest-validator/69a56b5069ca99f7317e6e19.md +++ b/curriculum/challenges/english/blocks/lab-cargo-manifest-validator/69a56b5069ca99f7317e6e19.md @@ -262,6 +262,7 @@ Calling `validateManifest()` with `{}` should return the new object `{ container ```js const testObj = { + }; const expected = { @@ -279,6 +280,27 @@ assert.notStrictEqual(copy, testObj, "validateManifest() should return a new obj assert.equal(Object.keys(testObj).length, 0, "validateManifest() should return a new object, not mutate the original") ``` +Calling `validateManifest()` with `{ containerId: null, destination: "Santa Cruz", weight: 304, unit: "kg", hazmat: false }` should return the new object `{ containerId: "Invalid" }` without mutating the source input. + +```js +const testObj = { + containerId: null, + destination: "Santa Cruz", + weight: 304, + unit: "kg", + hazmat: false +}; + +const expected = { + containerId: "Invalid" +}; + +const copy = validateManifest(testObj); +assert.isObject(copy); +assert.deepEqual(copy, expected, "validateManifest() did not return the expected object for null containerId"); +assert.notStrictEqual(copy, testObj, "validateManifest() should return a new object, not mutate the original"); +``` + Calling `validateManifest()` with `{ containerId: 0, destination: 405, weight: -84, unit: "pounds", hazmat: "no" }` should return the new object `{ containerId: "Invalid", destination: "Invalid", weight: "Invalid", unit: "Invalid", hazmat: "Invalid" }` without mutating the source input. ```js