Skip to content

Commit

Permalink
Fix finalize (#75)
Browse files Browse the repository at this point in the history
* test: unskip relevant tests
  • Loading branch information
mechanik-daniel authored May 29, 2024
1 parent 1e6bd71 commit e3c0d73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/helpers/parser/toJsonataString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export const toJsonataString = async (inExpr: string): Promise<string | undefine
const isEnclosed = parsed.trimStart().startsWith('(') && parsed.trimEnd().endsWith('(');
// parsed = parsed.includes('$__finalize') ? parsed : `${parsed}$__flashInstance := $__finalize($__flashInstance);`
parsed = !isEnclosed ? `(${parsed})` : parsed; // enclose in () if needed
res = parsed;
res = parsed.includes('$__finalize') ? parsed : parsed + '~>$__finalize';
}
} catch (e) {
console.timeEnd('Parse to JSONATA');
Expand Down
2 changes: 1 addition & 1 deletion tests/root/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('integration tests', () => {
});
});

test.skip('Case 4 - Profiled FLASH with no rules doesn\'t go through finalize', async () => {
test('Case 4 - Profiled FLASH with no rules doesn\'t go through finalize', async () => {
const mapping = 'InstanceOf: bp';
const requestBody = {
input: mockInput,
Expand Down

0 comments on commit e3c0d73

Please sign in to comment.