Skip to content

Commit

Permalink
BL-964
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw429s committed Jan 21, 2025
1 parent da1b845 commit 5612af4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ public Object _invoke( IBoxContext context, ArgumentsScope arguments ) {
throw new BoxValidationException( "Context or applicationName is required." );
}

newContext.invokeFunction( callback );

return null;
return newContext.invokeFunction( callback );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ public void testCanRunCodeInContext() {
context );
}

@Test
public void testCanRunCodeInContextReturnResult() {
instance.executeSource(
"""
result = runThreadInContext( context=getBoxContext(), callback=()=>"ran");
""",
context );
assert ( variables.get( result ).equals( "ran" ) );
}

@Test
public void testCanRunCodeInApplication() {
instance.executeSource(
Expand Down

0 comments on commit 5612af4

Please sign in to comment.