learnshopify.dev/Workspace
local task

Write two tests for your Function and run them.

Pass criterion: `tests/fixtures` has a test for a cart that merges and one for a cart that does not, and both pass.
$ npx @learnshopifydev/cli check your-own-fixture-suite
1. Delete the file `tests/fixtures/no-operations.json`

It is in `extensions/bundle-cart-transform`, and it no longer matches your Function. If your agent already deleted it in the last lesson, go to the next step.

2. Create the file `tests/fixtures/merges.json` and paste this in

It is a cart with two House Blend 250g and one Ceramic Dripper. The `output` is the answer you expect: one `linesMerge` for the Morning Ritual Bundle, with its discount of 10 percent as `price`.

3. Copy the file to `tests/fixtures/near-miss.json` and change the cart

Change the first `quantity` from 2 to 1, so the bundle is not complete. Change the expected answer to an empty list: `"operations": []`.

4. Run the tests

Both tests should pass.

0 / 1 task solved