|
| 1 | +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
| 2 | + |
| 3 | +exports[`should report invalid message "" with descriptive error 1`] = `[Error: Message is expected to be an object, but got string]`; |
| 4 | + |
| 5 | +exports[`should report invalid message %j with descriptive error 1`] = `[Error: Message is expected to be an object, but got array]`; |
| 6 | + |
| 7 | +exports[`should report invalid message {"id":"","type":"complete"} with descriptive error 1`] = `[Error: "complete" message requires a non-empty 'id' property]`; |
| 8 | + |
| 9 | +exports[`should report invalid message {"id":"","type":"error"} with descriptive error 1`] = `[Error: "error" message requires a non-empty 'id' property]`; |
| 10 | + |
| 11 | +exports[`should report invalid message {"id":"","type":"next"} with descriptive error 1`] = `[Error: "next" message requires a non-empty 'id' property]`; |
| 12 | + |
| 13 | +exports[`should report invalid message {"id":"","type":"subscribe"} with descriptive error 1`] = `[Error: "subscribe" message requires a non-empty 'id' property]`; |
| 14 | + |
| 15 | +exports[`should report invalid message {"id":"id","type":"error","payload":""} with descriptive error 1`] = `[Error: "error" message expects the 'payload' property to be an array of GraphQL errors, but got ""]`; |
| 16 | + |
| 17 | +exports[`should report invalid message {"id":"id","type":"error","payload":[]} with descriptive error 1`] = `[Error: "error" message expects the 'payload' property to be an array of GraphQL errors, but got []]`; |
| 18 | + |
| 19 | +exports[`should report invalid message {"id":"id","type":"error","payload":[{"iam":"invalid"}]} with descriptive error 1`] = `[Error: "error" message expects the 'payload' property to be an array of GraphQL errors, but got [{"iam":"invalid"}]]`; |
| 20 | + |
| 21 | +exports[`should report invalid message {"id":"id","type":"error","payload":{}} with descriptive error 1`] = `[Error: "error" message expects the 'payload' property to be an array of GraphQL errors, but got {}]`; |
| 22 | + |
| 23 | +exports[`should report invalid message {"id":"id","type":"error"} with descriptive error 1`] = `[Error: "error" message expects the 'payload' property to be an array of GraphQL errors, but got undefined]`; |
| 24 | + |
| 25 | +exports[`should report invalid message {"id":"id","type":"next","payload":""} with descriptive error 1`] = `[Error: "next" message expects the 'payload' property to be an object, but got string]`; |
| 26 | + |
| 27 | +exports[`should report invalid message {"id":"id","type":"next"} with descriptive error 1`] = `[Error: "next" message expects the 'payload' property to be an object, but got undefined]`; |
| 28 | + |
| 29 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":""} with descriptive error 1`] = `[Error: "subscribe" message expects the 'payload' property to be an object, but got string]`; |
| 30 | + |
| 31 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":[]} with descriptive error 1`] = `[Error: "subscribe" message expects the 'payload' property to be an object, but got array]`; |
| 32 | + |
| 33 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"operationName":{},"query":""}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'operationName' property to be a string or nullish or missing, but got object]`; |
| 34 | + |
| 35 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"operationName":0,"query":""}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'operationName' property to be a string or nullish or missing, but got number]`; |
| 36 | + |
| 37 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"query":"","extensions":""}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'extensions' property to be a an object or nullish or missing, but got string]`; |
| 38 | + |
| 39 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"query":"","extensions":0}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'extensions' property to be a an object or nullish or missing, but got number]`; |
| 40 | + |
| 41 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"query":"","variables":""}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'variables' property to be a an object or nullish or missing, but got string]`; |
| 42 | + |
| 43 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"query":{}}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'query' property to be a string, but got object]`; |
| 44 | + |
| 45 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{"query":0}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'query' property to be a string, but got number]`; |
| 46 | + |
| 47 | +exports[`should report invalid message {"id":"id","type":"subscribe","payload":{}} with descriptive error 1`] = `[Error: "subscribe" message payload expects the 'query' property to be a string, but got undefined]`; |
| 48 | + |
| 49 | +exports[`should report invalid message {"id":"id","type":"subscribe"} with descriptive error 1`] = `[Error: "subscribe" message expects the 'payload' property to be an object, but got undefined]`; |
| 50 | + |
| 51 | +exports[`should report invalid message {"id":0,"type":"complete"} with descriptive error 1`] = `[Error: "complete" message expects the 'id' property to be a string, but got number]`; |
| 52 | + |
| 53 | +exports[`should report invalid message {"id":0,"type":"subscribe"} with descriptive error 1`] = `[Error: "subscribe" message expects the 'id' property to be a string, but got number]`; |
| 54 | + |
| 55 | +exports[`should report invalid message {"type":""} with descriptive error 1`] = `[Error: Message is missing the 'type' property]`; |
| 56 | + |
| 57 | +exports[`should report invalid message {"type":"complete"} with descriptive error 1`] = `[Error: "complete" message expects the 'id' property to be a string, but got undefined]`; |
| 58 | + |
| 59 | +exports[`should report invalid message {"type":"connection_ack","payload":""} with descriptive error 1`] = `[Error: "connection_ack" message expects the 'payload' property to be an object or nullish or missing, but got ""]`; |
| 60 | + |
| 61 | +exports[`should report invalid message {"type":"connection_init","payload":""} with descriptive error 1`] = `[Error: "connection_init" message expects the 'payload' property to be an object or nullish or missing, but got ""]`; |
| 62 | + |
| 63 | +exports[`should report invalid message {"type":"connection_init","payload":0} with descriptive error 1`] = `[Error: "connection_init" message expects the 'payload' property to be an object or nullish or missing, but got "0"]`; |
| 64 | + |
| 65 | +exports[`should report invalid message {"type":"error"} with descriptive error 1`] = `[Error: "error" message expects the 'id' property to be a string, but got undefined]`; |
| 66 | + |
| 67 | +exports[`should report invalid message {"type":"next"} with descriptive error 1`] = `[Error: "next" message expects the 'id' property to be a string, but got undefined]`; |
| 68 | + |
| 69 | +exports[`should report invalid message {"type":"next"} with descriptive error 2`] = `[Error: "next" message expects the 'id' property to be a string, but got undefined]`; |
| 70 | + |
| 71 | +exports[`should report invalid message {"type":"nuxt"} with descriptive error 1`] = `[Error: Invalid message 'type' property "nuxt"]`; |
| 72 | + |
| 73 | +exports[`should report invalid message {"type":"ping","payload":0} with descriptive error 1`] = `[Error: "ping" message expects the 'payload' property to be an object or nullish or missing, but got "0"]`; |
| 74 | + |
| 75 | +exports[`should report invalid message {"type":"subscribe"} with descriptive error 1`] = `[Error: "subscribe" message expects the 'id' property to be a string, but got undefined]`; |
| 76 | + |
| 77 | +exports[`should report invalid message {"type":0} with descriptive error 1`] = `[Error: Message is missing the 'type' property]`; |
| 78 | + |
| 79 | +exports[`should report invalid message {} with descriptive error 1`] = `[Error: Message is missing the 'type' property]`; |
| 80 | + |
| 81 | +exports[`should report invalid message {} with descriptive error 2`] = `[Error: Message is missing the 'type' property]`; |
| 82 | + |
| 83 | +exports[`should report invalid message 0 with descriptive error 1`] = `[Error: Message is expected to be an object, but got number]`; |
| 84 | + |
| 85 | +exports[`should report invalid message 9 with descriptive error 1`] = `[Error: Message is expected to be an object, but got number]`; |
| 86 | + |
| 87 | +exports[`should report invalid message undefined with descriptive error 1`] = `[Error: Message is expected to be an object, but got function]`; |
| 88 | + |
| 89 | +exports[`should report invalid message undefined with descriptive error 2`] = `[Error: Message is expected to be an object, but got function]`; |
| 90 | + |
| 91 | +exports[`should report invalid message undefined with descriptive error 3`] = `[Error: Message is expected to be an object, but got function]`; |
0 commit comments