diff --git a/README.md b/README.md index 555f2b61..865b9cc1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ **esmock provides native ESM import and globals mocking for unit tests.** Use examples below as a quick-start guide, see the [descriptive and friendly esmock guide here,][4] or browse [esmock's test runner examples.][3] -Note: For older versions of node, less than version 20.6, `esmock` must be used with node's "--loader" as demonstrated [in the wiki.][4] Newer versions of node can use esmock as-is with no extra requirements. +_**Note: For versions of node prior to v20.6.0** "--loader" command line arguments must be used with `esmock` as demonstrated [in the wiki.][4] Current versions of node do not require "--loader"._ `esmock` has the below signature ``` javascript diff --git a/src/esmockErr.js b/src/esmockErr.js index 7ba66ac2..5124a16f 100644 --- a/src/esmockErr.js +++ b/src/esmockErr.js @@ -5,7 +5,8 @@ const errModuleIdNotMocked = (moduleId, parent) => new Error(`un-mocked moduleId: "${moduleId}" (used by ${parent})`) const errMissingLoader = () => - new Error('the loader chain process must include esmock. ' + new Error('For versions of node prior to v20.6.0, ' + + 'the loader chain process must include esmock. ' + 'start the process using --loader=esmock.') const errModuleIdNoDefs = (moduleId, parent) =>