@effect-app/vue 4.0.0-beta.22 → 4.0.0-beta.221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +1613 -0
  2. package/dist/commander.d.ts +634 -0
  3. package/dist/commander.d.ts.map +1 -0
  4. package/dist/commander.js +1070 -0
  5. package/dist/confirm.d.ts +21 -0
  6. package/dist/confirm.d.ts.map +1 -0
  7. package/dist/confirm.js +26 -0
  8. package/dist/errorReporter.d.ts +7 -5
  9. package/dist/errorReporter.d.ts.map +1 -1
  10. package/dist/errorReporter.js +14 -19
  11. package/dist/form.d.ts +15 -6
  12. package/dist/form.d.ts.map +1 -1
  13. package/dist/form.js +46 -13
  14. package/dist/index.d.ts +1 -1
  15. package/dist/intl.d.ts +15 -0
  16. package/dist/intl.d.ts.map +1 -0
  17. package/dist/intl.js +9 -0
  18. package/dist/lib.d.ts +8 -10
  19. package/dist/lib.d.ts.map +1 -1
  20. package/dist/lib.js +35 -10
  21. package/dist/makeClient.d.ts +156 -339
  22. package/dist/makeClient.d.ts.map +1 -1
  23. package/dist/makeClient.js +225 -376
  24. package/dist/makeContext.d.ts +1 -1
  25. package/dist/makeContext.d.ts.map +1 -1
  26. package/dist/makeIntl.d.ts +1 -1
  27. package/dist/makeIntl.d.ts.map +1 -1
  28. package/dist/makeUseCommand.d.ts +9 -0
  29. package/dist/makeUseCommand.d.ts.map +1 -0
  30. package/dist/makeUseCommand.js +13 -0
  31. package/dist/mutate.d.ts +54 -34
  32. package/dist/mutate.d.ts.map +1 -1
  33. package/dist/mutate.js +139 -46
  34. package/dist/query.d.ts +20 -39
  35. package/dist/query.d.ts.map +1 -1
  36. package/dist/query.js +133 -72
  37. package/dist/routeParams.d.ts +3 -2
  38. package/dist/routeParams.d.ts.map +1 -1
  39. package/dist/routeParams.js +4 -3
  40. package/dist/runtime.d.ts +10 -6
  41. package/dist/runtime.d.ts.map +1 -1
  42. package/dist/runtime.js +32 -18
  43. package/dist/toast.d.ts +51 -0
  44. package/dist/toast.d.ts.map +1 -0
  45. package/dist/toast.js +34 -0
  46. package/dist/withToast.d.ts +30 -0
  47. package/dist/withToast.d.ts.map +1 -0
  48. package/dist/withToast.js +64 -0
  49. package/examples/streamMutation.ts +72 -0
  50. package/package.json +48 -50
  51. package/src/commander.ts +3406 -0
  52. package/src/{experimental/confirm.ts → confirm.ts} +12 -14
  53. package/src/errorReporter.ts +65 -75
  54. package/src/form.ts +61 -18
  55. package/src/intl.ts +12 -0
  56. package/src/lib.ts +48 -20
  57. package/src/makeClient.ts +574 -1134
  58. package/src/{experimental/makeUseCommand.ts → makeUseCommand.ts} +8 -5
  59. package/src/mutate.ts +268 -127
  60. package/src/query.ts +203 -183
  61. package/src/routeParams.ts +3 -2
  62. package/src/runtime.ts +46 -21
  63. package/src/{experimental/toast.ts → toast.ts} +15 -27
  64. package/src/{experimental/withToast.ts → withToast.ts} +46 -12
  65. package/test/Mutation.test.ts +181 -24
  66. package/test/dist/form.test.d.ts.map +1 -1
  67. package/test/dist/lib.test.d.ts.map +1 -0
  68. package/test/dist/streamFinal.test.d.ts.map +1 -0
  69. package/test/dist/streamFn.test.d.ts.map +1 -0
  70. package/test/dist/stubs.d.ts +3531 -122
  71. package/test/dist/stubs.d.ts.map +1 -1
  72. package/test/dist/stubs.js +187 -32
  73. package/test/form-validation-errors.test.ts +25 -20
  74. package/test/form.test.ts +22 -3
  75. package/test/lib.test.ts +240 -0
  76. package/test/makeClient.test.ts +292 -38
  77. package/test/streamFinal.test.ts +64 -0
  78. package/test/streamFn.test.ts +457 -0
  79. package/test/stubs.ts +223 -43
  80. package/tsconfig.examples.json +20 -0
  81. package/tsconfig.json +0 -1
  82. package/tsconfig.json.bak +5 -2
  83. package/tsconfig.src.json +34 -34
  84. package/tsconfig.test.json +2 -2
  85. package/vitest.config.ts +5 -5
  86. package/dist/experimental/commander.d.ts +0 -359
  87. package/dist/experimental/commander.d.ts.map +0 -1
  88. package/dist/experimental/commander.js +0 -557
  89. package/dist/experimental/confirm.d.ts +0 -19
  90. package/dist/experimental/confirm.d.ts.map +0 -1
  91. package/dist/experimental/confirm.js +0 -28
  92. package/dist/experimental/intl.d.ts +0 -16
  93. package/dist/experimental/intl.d.ts.map +0 -1
  94. package/dist/experimental/intl.js +0 -5
  95. package/dist/experimental/makeUseCommand.d.ts +0 -8
  96. package/dist/experimental/makeUseCommand.d.ts.map +0 -1
  97. package/dist/experimental/makeUseCommand.js +0 -13
  98. package/dist/experimental/toast.d.ts +0 -47
  99. package/dist/experimental/toast.d.ts.map +0 -1
  100. package/dist/experimental/toast.js +0 -41
  101. package/dist/experimental/withToast.d.ts +0 -25
  102. package/dist/experimental/withToast.d.ts.map +0 -1
  103. package/dist/experimental/withToast.js +0 -45
  104. package/eslint.config.mjs +0 -24
  105. package/src/experimental/commander.ts +0 -1835
  106. package/src/experimental/intl.ts +0 -9
@@ -0,0 +1,457 @@
1
+ import { expect, it } from "@effect/vitest"
2
+ import * as Effect from "effect-app/Effect"
3
+ import * as Deferred from "effect/Deferred"
4
+ import * as Fiber from "effect/Fiber"
5
+ import * as Stream from "effect/Stream"
6
+ import { TestClock } from "effect/testing"
7
+ import { CommanderStatic } from "../src/commander.js"
8
+ import { AsyncResult } from "../src/lib.js"
9
+ import { useExperimental, useExperimentalE } from "./stubs.js"
10
+
11
+ // ---------------------------------------------------------------------------
12
+ // Helpers
13
+ // ---------------------------------------------------------------------------
14
+
15
+ /** Wait for the fiber spawned by `cmd.handle()` to finish. */
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ const join = (fiber: Fiber.Fiber<any, any>) => Fiber.join(fiber)
18
+
19
+ // ---------------------------------------------------------------------------
20
+ // Non-generator form — (arg) => Stream
21
+ // ---------------------------------------------------------------------------
22
+
23
+ it.live("streamFn: non-generator returning Stream runs stream and updates result", () =>
24
+ Effect.gen(function*() {
25
+ const Command = useExperimental({ toasts: [] })
26
+
27
+ const cmd = Command.streamFn("test-stream-plain")(
28
+ (_arg: number) => Stream.make(10, 20, 30)
29
+ )
30
+
31
+ expect(cmd.waiting).toBe(false)
32
+ yield* join(cmd.handle(1))
33
+
34
+ expect(cmd.result._tag).toBe("Success")
35
+ if (cmd.result._tag === "Success") {
36
+ expect(cmd.result.value).toBe(30)
37
+ expect(cmd.result.waiting).toBe(false)
38
+ }
39
+ }))
40
+
41
+ // ---------------------------------------------------------------------------
42
+ // Generator form — function*(arg) { yield* effect; return Stream }
43
+ // ---------------------------------------------------------------------------
44
+
45
+ it.live("streamFn: generator form executes yielded effects and subscribes to returned stream", () =>
46
+ Effect.gen(function*() {
47
+ const Command = useExperimental({ toasts: [] })
48
+
49
+ let generatorBodyExecuted = false
50
+
51
+ const cmd = Command.streamFn("test-stream-gen")(
52
+ function*(arg: number) {
53
+ generatorBodyExecuted = true
54
+ const doubled = yield* Effect.succeed(arg * 2)
55
+ return Stream.make(doubled, doubled + 1, doubled + 2)
56
+ }
57
+ )
58
+
59
+ yield* join(cmd.handle(5))
60
+
61
+ // Generator body MUST have run
62
+ expect(generatorBodyExecuted).toBe(true)
63
+
64
+ // Stream emitted three values: 10, 11, 12; last one should be in result
65
+ expect(cmd.result._tag).toBe("Success")
66
+ if (cmd.result._tag === "Success") {
67
+ expect(cmd.result.value).toBe(12)
68
+ expect(cmd.result.waiting).toBe(false)
69
+ }
70
+ }))
71
+
72
+ // ---------------------------------------------------------------------------
73
+ // Generator form with async effect (Effect.promise)
74
+ // ---------------------------------------------------------------------------
75
+
76
+ it.live("streamFn: generator form with async Effect.promise works", () =>
77
+ Effect.gen(function*() {
78
+ const Command = useExperimental({ toasts: [] })
79
+
80
+ let asyncValueReceived: string | undefined
81
+
82
+ const cmd = Command.streamFn("test-stream-gen-async")(
83
+ function*(arg: string) {
84
+ // Simulate the pattern from the bug report: yield* Effect.promise(...)
85
+ const result = yield* Effect.promise(() => Promise.resolve(`processed:${arg}`))
86
+ asyncValueReceived = result
87
+ return Stream.make(result, result + "!")
88
+ }
89
+ )
90
+
91
+ yield* join(cmd.handle("hello"))
92
+
93
+ expect(asyncValueReceived).toBe("processed:hello")
94
+ expect(cmd.result._tag).toBe("Success")
95
+ if (cmd.result._tag === "Success") {
96
+ expect(cmd.result.value).toBe("processed:hello!")
97
+ }
98
+ }))
99
+
100
+ // ---------------------------------------------------------------------------
101
+ // Non-generator returning Effect<Stream>
102
+ // ---------------------------------------------------------------------------
103
+
104
+ it.live("streamFn: non-generator returning Effect<Stream> runs stream", () =>
105
+ Effect.gen(function*() {
106
+ const Command = useExperimental({ toasts: [] })
107
+
108
+ const cmd = Command.streamFn("test-stream-effect-stream")(
109
+ (arg: number) => Effect.succeed(Stream.make(arg * 3, arg * 3 + 1))
110
+ )
111
+
112
+ yield* join(cmd.handle(4))
113
+
114
+ expect(cmd.result._tag).toBe("Success")
115
+ if (cmd.result._tag === "Success") {
116
+ expect(cmd.result.value).toBe(13) // 4*3+1 = 13
117
+ }
118
+ }))
119
+
120
+ // ---------------------------------------------------------------------------
121
+ // Generator form — waiting state flips correctly
122
+ // ---------------------------------------------------------------------------
123
+
124
+ it.live("streamFn: generator form sets waiting=true during execution then false after", () =>
125
+ Effect.gen(function*() {
126
+ const Command = useExperimental({ toasts: [] })
127
+
128
+ const cmd = Command.streamFn("test-stream-gen-waiting")(
129
+ function*(_arg: void) {
130
+ return Stream.make(1, 2, 3)
131
+ }
132
+ )
133
+
134
+ expect(cmd.waiting).toBe(false)
135
+ const fiber = cmd.handle()
136
+
137
+ // result transitions to initial(true) = waiting synchronously inside runStream
138
+ // after the fiber runs, waiting should settle to false
139
+ yield* join(fiber)
140
+ expect(cmd.waiting).toBe(false)
141
+
142
+ expect(AsyncResult.isSuccess(cmd.result)).toBe(true)
143
+ }))
144
+
145
+ // ---------------------------------------------------------------------------
146
+ // Generator form with a stream-transformer combinator
147
+ // ---------------------------------------------------------------------------
148
+
149
+ it.live("streamFn: generator form with combinator — combinator transforms the stream", () =>
150
+ Effect.gen(function*() {
151
+ const Command = useExperimental({ toasts: [] })
152
+
153
+ const emittedByCombinator: number[] = []
154
+
155
+ // A combinator that records each element it sees.
156
+ // The first argument may be a Stream or an Effect<Stream> (for generator-form handlers),
157
+ // matching how withDefaultToastStream handles it.
158
+ const spyCombinator = (
159
+ input: Stream.Stream<number, never, never> | Effect.Effect<Stream.Stream<number, never, never>>
160
+ ) => {
161
+ const stream: Stream.Stream<number, never, never> = Stream.isStream(input)
162
+ ? input
163
+ : Stream.unwrap(input as Effect.Effect<Stream.Stream<number, never, never>>)
164
+ return stream.pipe(
165
+ Stream.tap((v) =>
166
+ Effect.sync(() => {
167
+ emittedByCombinator.push(v)
168
+ })
169
+ )
170
+ )
171
+ }
172
+
173
+ const cmd = Command.streamFn("test-stream-gen-combinator")(
174
+ function*(arg: number) {
175
+ const base = yield* Effect.succeed(arg * 10)
176
+ return Stream.make(base, base + 1, base + 2)
177
+ },
178
+ // combinator receives (input, arg, ctx) — input is Stream or Effect<Stream> depending on handler form
179
+ (input: Stream.Stream<number, never, never> | Effect.Effect<Stream.Stream<number, never, never>>) =>
180
+ spyCombinator(input)
181
+ )
182
+
183
+ yield* join(cmd.handle(3))
184
+
185
+ // combinator must have seen all elements: 30, 31, 32
186
+ expect(emittedByCombinator).toEqual([30, 31, 32])
187
+
188
+ expect(cmd.result._tag).toBe("Success")
189
+ if (cmd.result._tag === "Success") {
190
+ expect(cmd.result.value).toBe(32)
191
+ }
192
+ }))
193
+
194
+ // ---------------------------------------------------------------------------
195
+ // Generator form — Stream.ensuring runs after stream completes
196
+ // ---------------------------------------------------------------------------
197
+
198
+ it.live("streamFn: generator form Stream.ensuring cleanup runs after stream ends", () =>
199
+ Effect.gen(function*() {
200
+ const Command = useExperimental({ toasts: [] })
201
+
202
+ let cleanupRan = false
203
+
204
+ const cmd = Command.streamFn("test-stream-gen-ensuring")(
205
+ function*(arg: number) {
206
+ const value = yield* Effect.succeed(arg + 100)
207
+ return Stream.make(value).pipe(
208
+ Stream.ensuring(Effect.sync(() => {
209
+ cleanupRan = true
210
+ }))
211
+ )
212
+ }
213
+ )
214
+
215
+ yield* join(cmd.handle(7))
216
+
217
+ expect(cleanupRan).toBe(true)
218
+ expect(cmd.result._tag).toBe("Success")
219
+ if (cmd.result._tag === "Success") {
220
+ expect(cmd.result.value).toBe(107)
221
+ }
222
+ }))
223
+
224
+ // ---------------------------------------------------------------------------
225
+ // Command.mapProgress — updates progress ref for each element
226
+ // ---------------------------------------------------------------------------
227
+
228
+ it.live("streamFn: Command.mapProgress updates progress ref for each stream element", () =>
229
+ Effect.gen(function*() {
230
+ const Command = useExperimental({ toasts: [] })
231
+
232
+ const cmd = Command.streamFn("test-map-progress")(
233
+ function*(_arg: void) {
234
+ return Stream.make(1, 2, 3).pipe(
235
+ CommanderStatic.mapProgress((r) =>
236
+ AsyncResult.isSuccess(r)
237
+ ? { text: `item-${r.value}`, percentage: r.value * 10 }
238
+ : undefined
239
+ )
240
+ )
241
+ }
242
+ )
243
+
244
+ // progress starts undefined (reactive unwraps the ref)
245
+ expect(cmd.progress).toBeUndefined()
246
+
247
+ yield* join(cmd.handle())
248
+
249
+ // after stream drains, last mapped progress value should be set
250
+ expect(cmd.progress).toEqual({ text: "item-3", percentage: 30 })
251
+ }))
252
+
253
+ // ---------------------------------------------------------------------------
254
+ // Command.updateProgress — imperative progress update from stream
255
+ // ---------------------------------------------------------------------------
256
+
257
+ it.live("streamFn: Command.updateProgress imperatively drives the progress ref", () =>
258
+ Effect.gen(function*() {
259
+ const Command = useExperimental({ toasts: [] })
260
+
261
+ const cmd = Command.streamFn("test-update-progress")(
262
+ function*(_arg: void) {
263
+ return Stream.make("a", "b").pipe(
264
+ Stream.tap((v) => CommanderStatic.updateProgress(`processing ${v}`))
265
+ )
266
+ }
267
+ )
268
+
269
+ expect(cmd.progress).toBeUndefined()
270
+ yield* join(cmd.handle())
271
+
272
+ expect(cmd.progress).toBe("processing b")
273
+ }))
274
+
275
+ // ---------------------------------------------------------------------------
276
+ // Command.withDefaultToastStream — in-progress (waiting) initial toast
277
+ // ---------------------------------------------------------------------------
278
+
279
+ it.effect("withDefaultToastStream: shows info toast while stream is running", () =>
280
+ Effect.gen(function*() {
281
+ const toasts: any[] = []
282
+ const Command = yield* useExperimentalE({ toasts, messages: { "handle.waiting": "{action} waiting…" } })
283
+
284
+ // Gate that holds the stream open past the 1s waiting-toast delay so we can
285
+ // observe the info toast while the stream is still in-flight.
286
+ const resume = yield* Deferred.make<void>()
287
+
288
+ const cmd = Command.streamFn("doWork")(
289
+ function*(_arg: void) {
290
+ return Stream.make(1).pipe(
291
+ Stream.tap(() => Deferred.await(resume))
292
+ )
293
+ },
294
+ Command.withDefaultToastStream()
295
+ )
296
+
297
+ const fiber = cmd.handle()
298
+
299
+ // Advance virtual time past the 1s waiting-toast delay; the stream is still
300
+ // paused on `resume`, so the info toast must have surfaced.
301
+ yield* TestClock.adjust("1100 millis")
302
+
303
+ expect(toasts.some((t) => t.type === "info")).toBe(true)
304
+ const infoToast = toasts.find((t) => t.type === "info")
305
+ expect(infoToast.message).toContain("doWork")
306
+
307
+ // Let the stream finish.
308
+ yield* Deferred.succeed(resume, undefined)
309
+ yield* join(fiber)
310
+
311
+ // After completion the same toast slot is replaced with a success toast.
312
+ expect(toasts.some((t) => t.type === "success")).toBe(true)
313
+ }))
314
+
315
+ // ---------------------------------------------------------------------------
316
+ // Command.withDefaultToastStream — fast streams skip the waiting toast
317
+ // ---------------------------------------------------------------------------
318
+
319
+ it.live("withDefaultToastStream: fast stream finishes before delay → no waiting toast", () =>
320
+ Effect.gen(function*() {
321
+ const toasts: any[] = []
322
+ const Command = useExperimental({ toasts, messages: { "handle.waiting": "{action} waiting…" } })
323
+
324
+ const cmd = Command.streamFn("doWorkFast")(
325
+ function*(_arg: void) {
326
+ return Stream.make(1, 2, 3)
327
+ },
328
+ Command.withDefaultToastStream()
329
+ )
330
+
331
+ yield* join(cmd.handle())
332
+
333
+ // Stream completed instantly; the 1s waiting fiber must have been interrupted before emitting an info toast.
334
+ expect(toasts.some((t) => t.type === "info")).toBe(false)
335
+ expect(toasts.some((t) => t.type === "success")).toBe(true)
336
+ }))
337
+
338
+ // ---------------------------------------------------------------------------
339
+ // Command.withDefaultToastStream — progress text/percent updates the toast
340
+ // ---------------------------------------------------------------------------
341
+
342
+ it.live("withDefaultToastStream: progress option updates waiting toast message", () =>
343
+ Effect.gen(function*() {
344
+ const toasts: any[] = []
345
+ const Command = useExperimental({
346
+ toasts,
347
+ messages: { "handle.waiting": "Working…", "handle.success": "{action} done" }
348
+ })
349
+
350
+ const progressSnapshots: string[] = []
351
+
352
+ const cmd = Command.streamFn("doWorkProgress")(
353
+ function*(_arg: void) {
354
+ return Stream.make(10, 50, 100).pipe(
355
+ Stream.tap((pct) =>
356
+ Effect.sync(() => {
357
+ progressSnapshots.push(`${pct}%`)
358
+ })
359
+ )
360
+ )
361
+ },
362
+ Command.withDefaultToastStream({
363
+ progress: (r) =>
364
+ AsyncResult.isSuccess(r)
365
+ ? { text: `${r.value}%`, percentage: r.value }
366
+ : undefined
367
+ })
368
+ )
369
+
370
+ yield* join(cmd.handle())
371
+
372
+ // All three stream elements were visited by the tap above
373
+ expect(progressSnapshots).toEqual(["10%", "50%", "100%"])
374
+
375
+ // cmd.progress reflects the last mapped value (reactive unwraps the ref)
376
+ expect(cmd.progress).toEqual({ text: "100%", percentage: 100 })
377
+
378
+ // A success toast should appear after the stream completes
379
+ expect(toasts.some((t) => t.type === "success")).toBe(true)
380
+ }))
381
+
382
+ // ---------------------------------------------------------------------------
383
+ // Command.withDefaultToastStream — failure shows warning/error toast
384
+ // ---------------------------------------------------------------------------
385
+
386
+ it.live("withDefaultToastStream: failure shows failure toast, not success toast", () =>
387
+ Effect.gen(function*() {
388
+ const toasts: any[] = []
389
+ const Command = useExperimental({ toasts })
390
+
391
+ class BoomError {
392
+ readonly _tag = "BoomError"
393
+ readonly message = "boom"
394
+ }
395
+
396
+ const cmd = Command.streamFn("doWorkFail")(
397
+ function*(_arg: void) {
398
+ return Stream.fail(new BoomError())
399
+ },
400
+ Command.withDefaultToastStream()
401
+ )
402
+
403
+ yield* join(cmd.handle())
404
+
405
+ // Typed errors → withDefaultToastStream calls toast.warning (level: "warn")
406
+ expect(toasts.some((t) => t.type === "warning" || t.type === "error")).toBe(true)
407
+ expect(toasts.some((t) => t.type === "success")).toBe(false)
408
+ }))
409
+
410
+ // ---------------------------------------------------------------------------
411
+ // Command.withDefaultToastStream — die (defect) shows error toast
412
+ // ---------------------------------------------------------------------------
413
+
414
+ it.live("withDefaultToastStream: die/defect shows error toast, not warning or success", () =>
415
+ Effect.gen(function*() {
416
+ const toasts: any[] = []
417
+ const Command = useExperimental({ toasts })
418
+
419
+ const cmd = Command.streamFn("doWorkDie")(
420
+ function*(_arg: void) {
421
+ // Stream.die produces a defect — Cause.findErrorOption returns Option.none()
422
+ // so defaultFailureMessageHandler returns a plain string → toast.error
423
+ return Stream.die(new Error("unexpected defect"))
424
+ },
425
+ Command.withDefaultToastStream()
426
+ )
427
+
428
+ yield* join(cmd.handle())
429
+
430
+ expect(toasts.some((t) => t.type === "error")).toBe(true)
431
+ expect(toasts.some((t) => t.type === "warning")).toBe(false)
432
+ expect(toasts.some((t) => t.type === "success")).toBe(false)
433
+ }))
434
+
435
+ // ---------------------------------------------------------------------------
436
+ // Command.withDefaultToastStream — success shows success toast
437
+ // ---------------------------------------------------------------------------
438
+
439
+ it.live("withDefaultToastStream: success shows success toast after stream drains", () =>
440
+ Effect.gen(function*() {
441
+ const toasts: any[] = []
442
+ const Command = useExperimental({ toasts, messages: { "handle.success": "{action} complete" } })
443
+
444
+ const cmd = Command.streamFn("doWorkSuccess")(
445
+ function*(_arg: void) {
446
+ return Stream.make(42)
447
+ },
448
+ Command.withDefaultToastStream()
449
+ )
450
+
451
+ yield* join(cmd.handle())
452
+
453
+ const successToast = toasts.find((t) => t.type === "success")
454
+ expect(successToast).toBeDefined()
455
+ expect(successToast.message).toContain("doWorkSuccess")
456
+ expect(toasts.some((t) => t.type === "error")).toBe(false)
457
+ }))