Skip to content

Commit 95d8dc2

Browse files
committed
debugging tests
Signed-off-by: Dan Selman <dselman@meta.com>
1 parent 34a47d1 commit 95d8dc2

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@accordproject/template-engine",
3-
"version": "2.6.4",
3+
"version": "2.6.5",
44
"description": "Generation of AgreementMark from TemplateMark + JSON Data",
55
"homepage": "https://github.com/accordproject",
66
"engines": {

src/JavaScriptEvaluator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class JavaScriptEvaluator {
119119
resolve({ result, elapsed: end - start });
120120
}
121121
else {
122-
// this is a template logic module, so we need to import it
122+
// this is a template logic esm module, so we need to dynamic import it
123123
const dataUri = 'data:text/javascript;base64,'
124124
+ btoa(request.code);
125125

@@ -232,6 +232,7 @@ export class JavaScriptEvaluator {
232232
});
233233
worker.on('exit', (code: any) => {
234234
if (code === null) {
235+
// timeout
235236
this.workers = this.workers.filter((w: ChildProcess) => w.pid !== worker.pid);
236237
const end = new Date().getTime();
237238
reject({ timeout: true, elapsed: end - start });

test/JavaScriptEvaluator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const javaScriptEvaluator = new JavaScriptEvaluator({
4343
describe('javascript evaluator', () => {
4444
test('should pass stress test with javascript safe', async () => {
4545
const promises = [];
46-
for(let n=0; n < 1000; n++) {
46+
for(let n=0; n < 100; n++) {
4747
const p = javaScriptEvaluator.evalChildProcess(SIMPLE, {timeout: 60000});
4848
promises.push(p);
4949
}

test/archives/latedeliveryandpenalty-typescript/logic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ implementing the trigger method and optionally the init method.
2121

2222
## Current Limitations
2323

24-
1. All template logic must be written in TypeScript and in a single file called logic.ts
24+
1. All template logic must be written in TypeScript and in a single file called logic.ts within the logic folder of the template
2525
2. You cannot import third-party modules into your template logic

0 commit comments

Comments
 (0)