1// Schema Benchmarks requires real Date instances in the shared input.
2const date = new Date(0)
3
4export const validData = {
5 id: 252,
6 created: date,
7 title: "Apple",
8 brand: "Sunny Backyard",
9 description: "Red apple from Lake Constance",
10 price: 89,
11 discount: null,
12 quantity: 5,
13 tags: ["fruit", "red", "round", "sweet", "juicy", "healthy"],
14 images: [
15 {
16 id: 248,
17 created: date,
18 title: "Close up of an apple on a tree",
19 type: "jpg",
20 size: 92357232,
21 url: "https://www.example.com/images/248"
22 },
23 {
24 id: 295,
25 created: date,
26 title: "Our apples in the final packaging",
27 type: "jpg",
28 size: 83247232,
29 url: "https://www.example.com/images/295"
30 },
31 {
32 id: 723,
33 created: date,
34 title: "Our fruit fields at Lake Constance",
35 type: "jpg",
36 size: 72356345,
37 url: "https://www.example.com/images/723"
38 }
39 ],
40 ratings: [
41 {
42 id: 315,
43 stars: 4.5,
44 title: "Tastes super delicious",
45 text: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.",
46 images: [
47 {
48 id: 835,
49 created: date,
50 title: "The result of our apple pie",
51 type: "jpg",
52 size: 8247493,
53 url: "https://www.example.com/images/835"
54 }
55 ]
56 },
57 {
58 id: 642,
59 stars: 5,
60 title: "Very tasty! I will buy them again!",
61 text:
62 "In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt.",
63 images: [
64 {
65 id: 352,
66 created: date,
67 title: "The fruit salad in a bowl",
68 type: "jpg",
69 size: 3582543,
70 url: "https://www.example.com/images/352"
71 },
72 {
73 id: 465,
74 created: date,
75 title: "The fruit salad on a plate",
76 type: "jpg",
77 size: 9824742,
78 url: "https://www.example.com/images/465"
79 }
80 ]
81 }
82 ]
83}
84
85export const invalidData = {
86 id: 252,
87 created: date,
88 title: "",
89 brand: "Sunny Backyard",
90 description: "Red apple from Lake Constance",
91 price: 0,
92 discount: null,
93 quantity: 1000,
94 tags: ["fruit", null, "round", undefined, "juicy", "healthy"],
95 images: [
96 {
97 created: null,
98 title: "Close up of an apple on a tree",
99 type: "mp4",
100 size: 92357232,
101 url: "https://www.example.com/images/248"
102 },
103 {
104 id: 295,
105 created: date,
106 title: "Our apples in the final packaging",
107 type: "jpg",
108 size: 83247232
109 },
110 {
111 id: 723,
112 created: date,
113 title: "Our fruit fields at Lake Constance",
114 type: "jpg",
115 size: 72356345,
116 url: "https://www.example.com/images/723"
117 }
118 ],
119 ratings: [
120 {
121 id: 315,
122 stars: 4.5,
123 title: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.",
124 text: "Tastes super delicious",
125 images: [
126 {
127 id: 835,
128 created: date,
129 title: "The result of our apple pie",
130 type: "jpg",
131 size: 8247493,
132 url: "https://www.example.com/images/835"
133 }
134 ]
135 },
136 {
137 id: 642,
138 stars: 5,
139 title: "Very tasty! I will buy them again!",
140 text:
141 "In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt.",
142 images: [
143 {
144 id: "352",
145 created: undefined,
146 title: "The fruit salad in a bowl",
147 type: "jpg",
148 size: 3582543,
149 url: "INVALID_URL"
150 },
151 {
152 id: 465,
153 created: date,
154 url: "https://www.example.com/images/465"
155 }
156 ]
157 }
158 ]
159}