test: fix flaky test-webcrypto-encrypt-decrypt-aes by RaisinTen · Pull Request #37380 · nodejs/node

@nodejs-github-bot added the test

Issues and PRs related to the tests.

label

Feb 15, 2021
* Use a copy of plaintext to prevent tampering of the original
* Since subtle.decrypt returns a Promise containing an ArrayBuffer and
  ArrayBuffers cannot be modified directly, create a Buffer from it
  right away so that the modification in the next line works as intended

Fixes: nodejs#35586

@RaisinTen

@RaisinTen

@RaisinTen RaisinTen added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Feb 17, 2021

MylesBorins

MylesBorins pushed a commit that referenced this pull request

Feb 18, 2021
* Use a copy of plaintext to prevent tampering of the original
* Since subtle.decrypt returns a Promise containing an ArrayBuffer and
  ArrayBuffers cannot be modified directly, create a Buffer from it
  right away so that the modification in the next line works as intended

Fixes: #35586

PR-URL: #37380
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>

@RaisinTen RaisinTen deleted the test/fix-flaky-webcrypto-test branch

February 19, 2021 13:32

targos pushed a commit that referenced this pull request

Feb 28, 2021
* Use a copy of plaintext to prevent tampering of the original
* Since subtle.decrypt returns a Promise containing an ArrayBuffer and
  ArrayBuffers cannot be modified directly, create a Buffer from it
  right away so that the modification in the next line works as intended

Fixes: #35586

PR-URL: #37380
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>