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

Testing Iroh Dynamic Analysis Tool #49

Open
wants to merge 4 commits into
base: f24
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ logs/
.eslintrc
test/files
*.min.js
install/docker/
install/docker/
iroh-tool-test-artifacts
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ jobs:
run: |
node app --setup="${SETUP}" --ci="${CI}"

- name: Install Iroh Tool
run: npm install iroh

- name: Iroh test
run: node iroh-tool-test-artifacts/iroh-test.js

- name: Run ESLint
run: npm run lint

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions iroh-tool-test-artifacts/iroh-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

const Iroh = require('iroh');

const code = `
const groupsPerPage = 10;

`;

const stage = new Iroh.Stage(code);
const listener = stage.addListener(Iroh.VAR);
// logs variable name and value after creation
listener.on('after', (e) => {
console.log(e.name, '=>', e.value);
});

eval(stage.script);