Skip to content

Commit

Permalink
test: add example with camunda dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Jan 23, 2025
1 parent 100f0de commit e292d44
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"lint": "eslint .",
"pull:platform-docs": "git -C camunda-platform-docs pull || git clone [email protected]:camunda/camunda-platform-docs.git camunda-platform-docs",
"start": "cross-env SINGLE_START=true npm run dev",
"start:camunda": "cross-env SINGLE_START=camunda npm run dev",
"dev": "npm test -- --auto-watch --no-single-run",
"prepare": "run-s build"
},
Expand Down
26 changes: 25 additions & 1 deletion test/spec/CodeEditor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('CodeEditor', function() {
});


(singleStart ? it.only : it)('should render', async function() {
(singleStart && singleStart !== 'camunda' ? it.only : it)('should render', async function() {

// when
const initialValue = `for
Expand Down Expand Up @@ -124,6 +124,30 @@ return
});


(singleStart === 'camunda' ? it.only : it)('should render with camunda dialect', async function() {

// when
const initialValue = '"At Camunda, you can" + escape.`variables with backticks`';

const editor = new FeelEditor({
container,
value: initialValue,
parserDialect: 'camunda',
variables: [
{
name: 'variable with space',
info: 'Needs to be escaped',
detail: 'Process_1'
}
]
});

// then
expect(editor).to.exist;

});


it('should use supplied document', async function() {

// when
Expand Down

0 comments on commit e292d44

Please sign in to comment.