headers.test.ts.snap 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
  2. exports[`toHeaders > empty 1`] = `[]`;
  3. exports[`toHeaders > mixed 1`] = `
  4. [
  5. {
  6. "name": "Host",
  7. "value": "a.example.test",
  8. },
  9. {
  10. "name": "X-Trace",
  11. "value": "1",
  12. },
  13. {
  14. "name": "X-Trace",
  15. "value": "2",
  16. },
  17. ]
  18. `;
  19. exports[`toHeaders > multi array 1`] = `
  20. [
  21. {
  22. "name": "Accept",
  23. "value": "text/html",
  24. },
  25. {
  26. "name": "Accept",
  27. "value": "application/json",
  28. },
  29. ]
  30. `;
  31. exports[`toHeaders > null 1`] = `[]`;
  32. exports[`toHeaders > primitive 1`] = `[]`;
  33. exports[`toHeaders > single array 1`] = `
  34. [
  35. {
  36. "name": "Host",
  37. "value": "a.example.test",
  38. },
  39. ]
  40. `;
  41. exports[`toHeaders > single string 1`] = `
  42. [
  43. {
  44. "name": "Host",
  45. "value": "example.test",
  46. },
  47. ]
  48. `;
  49. exports[`toHeaders > undefined 1`] = `[]`;
  50. exports[`toV2Headers (arr=false) > duplicate name 1`] = `
  51. {
  52. "Accept": "application/json",
  53. }
  54. `;
  55. exports[`toV2Headers (arr=false) > empty 1`] = `{}`;
  56. exports[`toV2Headers (arr=false) > empty name skipped 1`] = `
  57. {
  58. "X-Real": "kept",
  59. }
  60. `;
  61. exports[`toV2Headers (arr=false) > empty value skipped 1`] = `
  62. {
  63. "X-Real": "kept",
  64. }
  65. `;
  66. exports[`toV2Headers (arr=false) > single 1`] = `
  67. {
  68. "Host": "example.test",
  69. }
  70. `;
  71. exports[`toV2Headers (arr=true) > duplicate name 1`] = `
  72. {
  73. "Accept": [
  74. "text/html",
  75. "application/json",
  76. ],
  77. }
  78. `;
  79. exports[`toV2Headers (arr=true) > empty 1`] = `{}`;
  80. exports[`toV2Headers (arr=true) > empty name skipped 1`] = `
  81. {
  82. "X-Real": [
  83. "kept",
  84. ],
  85. }
  86. `;
  87. exports[`toV2Headers (arr=true) > empty value skipped 1`] = `
  88. {
  89. "X-Real": [
  90. "kept",
  91. ],
  92. }
  93. `;
  94. exports[`toV2Headers (arr=true) > single 1`] = `
  95. {
  96. "Host": [
  97. "example.test",
  98. ],
  99. }
  100. `;