Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): remove ffi-napi from fixture dependencies #1143

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/fixture/native-app1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@types/node": "^12.0.10",
"ffi-napi": "4.0.3"
"tree-sitter": "0.21.1"
},
"dependencies": {
"@newrelic/native-metrics": "5.3.0",
Expand Down
22 changes: 12 additions & 10 deletions test/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('rebuilder', () => {
});

it('should not have rebuilt top level devDependencies', async () => {
await expectNativeModuleToNotBeRebuilt(testModulePath, 'ffi-napi');
await expectNativeModuleToNotBeRebuilt(testModulePath, 'ref-napi');
});

it('should not download files in the module directory', async () => {
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('rebuilder', () => {
buildPath: testModulePath,
electronVersion: testElectronVersion,
arch: process.arch,
onlyModules: ['ffi-napi', 'ref-napi'], // TODO: check to see if there's a bug with scoped modules
onlyModules: ['farmhash', 'ref-napi'], // TODO: check to see if there's a bug with scoped modules
force: true
});
let built = 0;
Expand All @@ -185,17 +185,19 @@ describe('rebuilder', () => {
before(async () => await resetTestModule(testModulePath));
after(async() => await cleanupTestModule(testModulePath));

it('should have rebuilt ffi-napi module in Debug mode', async () => {
it("should have rebuilt farmhash module in Debug mode", async () => {
await rebuild({
buildPath: testModulePath,
electronVersion: testElectronVersion,
arch: process.arch,
onlyModules: ['ffi-napi'],
onlyModules: ["farmhash"],
force: true,
debug: true
debug: true,
});
await expectNativeModuleToBeRebuilt(testModulePath, 'ffi-napi', { buildType: 'Debug' });
await expectNativeModuleToNotBeRebuilt(testModulePath, 'ffi-napi');
await expectNativeModuleToBeRebuilt(testModulePath, "farmhash", {
buildType: "Debug",
});
await expectNativeModuleToNotBeRebuilt(testModulePath, "farmhash");
});
});

Expand All @@ -205,16 +207,16 @@ describe('rebuilder', () => {
before(async () => await resetTestModule(testModulePath));
after(async() => await cleanupTestModule(testModulePath));

it('should have rebuilt ffi-napi module using clang mode', async () => {
it('should have rebuilt farmhash module using clang mode', async () => {
await rebuild({
buildPath: testModulePath,
electronVersion: testElectronVersion,
arch: process.arch,
onlyModules: ['ffi-napi'],
onlyModules: ['farmhash'],
force: true,
useElectronClang: true
});
await expectNativeModuleToBeRebuilt(testModulePath, 'ffi-napi');
await expectNativeModuleToBeRebuilt(testModulePath, 'farmhash');
});
});
});