diff --git a/test/parallel/test-eslint-prefer-primordials.js b/test/parallel/test-eslint-prefer-primordials.js index 0df64083fddb3c..aa7f1940675f77 100644 --- a/test/parallel/test-eslint-prefer-primordials.js +++ b/test/parallel/test-eslint-prefer-primordials.js @@ -89,6 +89,15 @@ new RuleTester({ `, options: [{ name: 'Function' }], }, + { + code: ` + const { Function } = primordials; + let rename; + rename = Function; + const obj = { rename }; + `, + options: [{ name: 'Function' }], + }, ], invalid: [ { @@ -211,5 +220,14 @@ new RuleTester({ options: [{ name: 'Function' }], errors: [{ message: /const { Function } = primordials/ }] }, + { + code: ` + let rename; + rename = Function; + const obj = { rename }; + `, + options: [{ name: 'Function' }], + errors: [{ message: /const { Function } = primordials/ }] + }, ] });