fix(curriculum): add seed data and refine description in smart pantry lab (#67722)

This commit is contained in:
Aniket Patel 2026-06-02 05:39:37 -04:00 committed by GitHub
parent 5bcd47dd7a
commit 503ea734b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,15 +13,7 @@ You will simulate receiving a shipment of pantry items, deciding what to do with
**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
The `rawData` array contains pipe-separated strings with the format `sku|name|qty|expires|zone`, where `zone` is optional. For example:
```js
const rawData = [
"A10|Tomatoes|5|2027-01-01", // no zone field
"B21|Bananas|10|2027-01-01|fridge", // zone: "fridge"
"C32|Eggs|3|2027-01-01|pantry", // zone: "pantry"
];
```
The `rawData` array contains pipe-separated strings with the format `sku|name|qty|expires|zone`, where `zone` is optional.
**User Stories:**
@ -260,7 +252,19 @@ assert.isOk(groupedLog, "Log the grouped actions object to the console.");
## --seed-contents--
```js
const pantry = [
{ sku: "A10", name: "Tomatoes", qty: 4, expires: "2027-01-01", zone: "fridge" },
{ sku: "D43", name: "Pineapples", qty: 2, expires: "2020-01-01", zone: "general" }
];
const rawData = [
"A10|Tomatoes|5|2027-01-01",
"B21|Bananas|10|2027-01-01",
"C32|Eggs|3|2027-01-01|fridge",
"C32|Eggs|3|2027-01-01",
"D43|Pineapples|0|2027-01-01",
"E54|Peppers|-1|2027-01-01|fridge"
];
```
# --solutions--