Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(protocoltests): string list header bindings that require quoting #6012

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Apr 18, 2024

Issue

Fixed in smithy-lang/smithy#1049

Description

Enables protocol tests for string list header bindings that require quoting

Testing

CI


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr
Copy link
Member Author

trivikr commented Apr 18, 2024

Error

  ● RestJsonInputAndOutputWithQuotedStringHeaders:Request

    expect(received).toBe(expected) // Object.is equality

    Expected: "\"b,c\", \"\\\"def\\\"\", a"
    Received: "b,c, \"def\", a"

      3521 |
      3522 |     expect(r.headers["x-stringlist"]).toBeDefined();
    > 3523 |     expect(r.headers["x-stringlist"]).toBe('"b,c", "\\"def\\"", a');
           |                                       ^
      3524 |
      3525 |     expect(r.body).toBeFalsy();
      3526 |   }

      at Object.<anonymous> (test/functional/restjson1.spec.ts:3523:39)

  ● RestJsonInputAndOutputWithQuotedStringHeaders:Response

    expect(received).toBe(expected) // Object.is equality

    Expected: true
    Received: false

      3915 |   Object.keys(paramsToValidate).forEach((param) => {
      3916 |     expect(r[param]).toBeDefined();
    > 3917 |     expect(equivalentContents(r[param], paramsToValidate[param])).toBe(true);
           |                                                                   ^
      3918 |   });
      3919 | });
      3920 |

      at test/functional/restjson1.spec.ts:3917:67
          at Array.forEach (<anonymous>)
      at Object.<anonymous> (test/functional/restjson1.spec.ts:3915:33)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant