test: reuse ffi.suffix instead of reimplementing it · nodejs/node@b9e596f · GitHub
Skip to content

Commit b9e596f

Browse files
leah-1eeaduh95
authored andcommitted
test: reuse ffi.suffix instead of reimplementing it
ffi-test-common.js duplicated the platform branch already exposed as ffi.suffix, risking drift if lib/ffi.js changes. Reuse it, and require it after skipIfFFIMissing() so a build without FFI skips instead of throwing. Also assert ffi.suffix resolves to the correct value per platform, since test-ffi-module.js only checked that the key exists. Signed-off-by: leah-1ee <dltjddms1028@gmail.com> PR-URL: #64840 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Aviv Keller <me@aviv.sh>
1 parent 70cd5df commit b9e596f

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

test/ffi/ffi-test-common.js

Lines changed: 3 additions & 6 deletions

test/ffi/test-ffi-module.js

Lines changed: 8 additions & 0 deletions

0 commit comments

Comments
 (0)