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

Allow String as execute_script name parameter #1069

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

allevo
Copy link

@allevo allevo commented Feb 4, 2025

This PR allows the String usage for execute_script

let mut runtime = JsRuntime::new(RuntimeOptions::default());

let id = 1;
let script_name = format!("script-{}", id);
let script_content = format!("console.log('{}')", id);
let result = runtime.execute_script(script_name, script_content).unwrap();

@CLAassistant
Copy link

CLAassistant commented Feb 4, 2025

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.45%. Comparing base (0c7f83e) to head (6357953).
Report is 252 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1069      +/-   ##
==========================================
+ Coverage   81.43%   81.45%   +0.01%     
==========================================
  Files          97      101       +4     
  Lines       23877    27951    +4074     
==========================================
+ Hits        19445    22768    +3323     
- Misses       4432     5183     +751     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants