diff options
author | Gus Caplan <me@gus.host> | 2018-01-30 23:03:56 -0600 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2018-02-03 11:04:34 -0800 |
commit | 6d84ecefcd7da51ee5f9613f745ba5d0a9818726 (patch) | |
tree | 03249c6fdd9fab8ef4d02e28c45252aa91286ad0 /test/parallel/test-vm-module-errors.js | |
parent | f8fda0d5ada6e391941b328f98e429e51a05ffda (diff) | |
download | android-node-v8-6d84ecefcd7da51ee5f9613f745ba5d0a9818726.tar.gz android-node-v8-6d84ecefcd7da51ee5f9613f745ba5d0a9818726.tar.bz2 android-node-v8-6d84ecefcd7da51ee5f9613f745ba5d0a9818726.zip |
vm: flip Module#link's signature
The specifier parameter is deemed to be more essential than
referencingModule. Flipping the parameter order allows developers to
write simple linker functions that only take in a specifier.
PR-URL: https://github.com/nodejs/node/pull/18471
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/parallel/test-vm-module-errors.js')
-rw-r--r-- | test/parallel/test-vm-module-errors.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js index 8bcb101ccc..1c7e01cf30 100644 --- a/test/parallel/test-vm-module-errors.js +++ b/test/parallel/test-vm-module-errors.js @@ -109,7 +109,7 @@ async function checkModuleState() { { const m = new Module('import "foo";'); - await m.link(common.mustCall(async (module, specifier) => { + await m.link(common.mustCall(async (specifier, module) => { assert.strictEqual(module, m); assert.strictEqual(specifier, 'foo'); assert.strictEqual(m.linkingStatus, 'linking'); |