Skip to content

Commit

Permalink
WIP: Add lots of logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed May 25, 2023
1 parent f5780d9 commit cb31463
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,21 @@ describe("Frida-JS", () => {
childNodeProc.on('error', reject);
});

console.log('Node proc spawned');

// Inject into it:
const fridaClient = await connect();
await fridaClient.injectIntoNodeJsProcess(
childNodeProc.pid!,
'console.log("Hello from injected script!"); process.exit(0);'
);

console.log('Node proc injected');

const { exitCode, output } = await outputPromise;

console.log('Node proc exited');

expect(exitCode).to.equal(0);
expect(output).to.equal('Hello from injected script!\n');
});
Expand Down

0 comments on commit cb31463

Please sign in to comment.