Skip to content

[v9.x backport] test: fix require-deps-deprecation for installed deps

Test test-require-deps-deprecation.js was failing when user already had node installed with acorn in require.resolve range.

Modified test to acknowledge the possibility and throw only if acorn is found in the deps directory.

Also changed the deprecation test for v9.x: common.expectWarning was failing because the required deps now throw ReferenceErrors when not properly called internally in the right order.

PR-URL: https://github.com/nodejs/node/pull/17848 Fixes: https://github.com/nodejs/node/issues/17148 Reviewed-By: Tiancheng "Timothy" Gu timothygu99@gmail.com Reviewed-By: Colin Ihrig cjihrig@gmail.com Reviewed-By: Rich Trott rtrott@gmail.com Reviewed-By: James M Snell jasnell@gmail.com

Original PR: https://github.com/nodejs/node/pull/17848

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Merge request reports

Loading