Skip to content

Replace test-buffer-bindingobj-no-zerofill.js by an addon test #22547

Description

@starkwang

Now the test/parallel/test-buffer-bindingobj-no-zerofill.js uses monkey-patches to simulate the situation when setupBufferJS() has an undefined zeroFill.

// Load from file system because internal buffer is already loaded and we're
// testing code that runs on first load only.
// Do not move this require() to top of file. It is important that
// `require('internal/buffer').setupBufferJS` be monkey-patched before this
// runs.
const monkeyPatchedBuffer = require('../../lib/buffer');

But the monkey-patches are little bit tricky and crash the tests when we move buffer module to internalBinding (#22370 (comment))

We need replace it by a C++ addon test now. See conversation at 27e84ddd4e1#r19182129 and #11706.

/cc @Trott @bnoordhuis

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions