electron/spec/fixtures/native-addon/uv-dlopen/index.js
Samuel Attard 27c38bdead
build: add import/order eslint rule (#44107)
build: add import/order eslint rule (#44085)

* build: add import/order eslint rule

* chore: run lint:js --fix
2024-10-02 21:36:15 -07:00

18 lines
487 B
JavaScript

const path = require('node:path');
const testLoadLibrary = require('./build/Release/test_module');
const lib = (() => {
switch (process.platform) {
case 'linux':
return path.resolve(__dirname, 'build/Release/foo.so');
case 'darwin':
return path.resolve(__dirname, 'build/Release/foo.dylib');
case 'win32':
return path.resolve(__dirname, 'build/Release/libfoo.dll');
default:
throw new Error('unsupported os');
}
})();
testLoadLibrary(lib);