diff --git a/change/@microsoft-fast-html-deep-merge-10831af4-0f87-48c5-bc30-f7fe72593a86.json b/change/@microsoft-fast-html-deep-merge-10831af4-0f87-48c5-bc30-f7fe72593a86.json new file mode 100644 index 00000000000..9841a1672d5 --- /dev/null +++ b/change/@microsoft-fast-html-deep-merge-10831af4-0f87-48c5-bc30-f7fe72593a86.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore(fast-html): use @microsoft/fast-build to build deep-merge fixture", + "packageName": "@microsoft/fast-html", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/packages/fast-html/scripts/build-fixtures.js b/packages/fast-html/scripts/build-fixtures.js index 897306f26b8..87825011246 100644 --- a/packages/fast-html/scripts/build-fixtures.js +++ b/packages/fast-html/scripts/build-fixtures.js @@ -10,6 +10,7 @@ import { fileURLToPath } from "node:url"; const fixtures = [ "attribute", "binding", + "deep-merge", "event", "ref", "slotted", diff --git a/packages/fast-html/test/fixtures/deep-merge/entry.html b/packages/fast-html/test/fixtures/deep-merge/entry.html new file mode 100644 index 00000000000..771f2034e8a --- /dev/null +++ b/packages/fast-html/test/fixtures/deep-merge/entry.html @@ -0,0 +1,156 @@ + + + + + Deep Merge Test Fixture + + + + + + + diff --git a/packages/fast-html/test/fixtures/deep-merge/index.html b/packages/fast-html/test/fixtures/deep-merge/index.html index 4d077c7756d..c9f54e51ad4 100644 --- a/packages/fast-html/test/fixtures/deep-merge/index.html +++ b/packages/fast-html/test/fixtures/deep-merge/index.html @@ -1,8 +1,7 @@ - - + Deep Merge Test Fixture - - + + diff --git a/packages/fast-html/test/fixtures/deep-merge/state.json b/packages/fast-html/test/fixtures/deep-merge/state.json new file mode 100644 index 00000000000..c0d6eeb215f --- /dev/null +++ b/packages/fast-html/test/fixtures/deep-merge/state.json @@ -0,0 +1,68 @@ +{ + "showDetails": true, + "stats": { + "totalOrders": 3, + "totalRevenue": 425.5, + "activeUsers": 2 + }, + "users": [ + { + "id": 1, + "name": "Alice Johnson", + "email": "alice@example.com", + "profile": { + "age": 28, + "location": { + "city": "New York", + "country": "USA" + }, + "preferences": { + "theme": "dark", + "notifications": true + } + }, + "orders": [ + { + "id": 101, + "date": "2024-01-15", + "total": 150.5, + "items": [ + { + "id": 1001, + "name": "Laptop", + "price": 100.0, + "inStock": true, + "tags": ["electronics", "computers"], + "metadata": { "views": 250, "rating": 4.5 } + }, + { + "id": 1002, + "name": "Mouse", + "price": 50.5, + "inStock": true, + "tags": ["electronics", "accessories"], + "metadata": { "views": 180, "rating": 4.0 } + } + ] + } + ] + }, + { + "id": 2, + "name": "Bob Smith", + "email": "bob@example.com", + "profile": { + "age": 35, + "location": { + "city": "London", + "country": "UK" + }, + "preferences": { + "theme": "light", + "notifications": false + } + }, + "orders": [] + } + ] +} diff --git a/packages/fast-html/test/fixtures/deep-merge/templates.html b/packages/fast-html/test/fixtures/deep-merge/templates.html new file mode 100644 index 00000000000..a9d05a52ddc --- /dev/null +++ b/packages/fast-html/test/fixtures/deep-merge/templates.html @@ -0,0 +1,91 @@ + + +