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(amazonq): patch #5994 causing CI test failing #6019

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Nov 14, 2024

Problem

#5994 is causing CI test failure
misuse of sinon.alwaysReturned()

Solution

should use sinon.returns()


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Will-ShaoHua Will-ShaoHua changed the title test(amazonq): patch #5994 test(amazonq): patch #5994 (wip) Nov 14, 2024
@Will-ShaoHua Will-ShaoHua marked this pull request as ready for review November 14, 2024 19:41
@Will-ShaoHua Will-ShaoHua requested a review from a team as a code owner November 14, 2024 19:41
@Will-ShaoHua Will-ShaoHua changed the title test(amazonq): patch #5994 (wip) test(amazonq): patch #5994 causing CI test failing Nov 14, 2024
@Will-ShaoHua Will-ShaoHua merged commit 761bd3a into aws:master Nov 14, 2024
26 of 35 checks passed
@Will-ShaoHua Will-ShaoHua deleted the lsp branch November 14, 2024 20:26
@justinmk3
Copy link
Contributor

Still some other failing tests:

 1) supplementalContextUtil
       fetchSupplementalContext
         openTabsContext
           opentabContext should include chunks if non empty:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert_1.default.ok(actual?.supplementalContextItems.length === 3)

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/unit/codewhisperer/util/supplemetalContextUtil.test.ts:43:24)

  2) supplementalContextUtil
       fetchSupplementalContext
         openTabsContext
           opentabsContext should filter out empty chunks:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert_1.default.ok(actual?.supplementalContextItems.length === 0)

      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/unit/codewhisperer/util/supplemetalContextUtil.test.ts:57:24)

justinmk3 pushed a commit that referenced this pull request Nov 14, 2024
## Problem
same issue #6019 is trying to fix
misuse of `sinon.alwaysReturned()`

## Solution
`sinon.returns()`
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.

3 participants