Skip to content

Commit

Permalink
Add sample to show function call with angular parser
Browse files Browse the repository at this point in the history
  • Loading branch information
edi9999 committed Sep 15, 2023
1 parent 82ef668 commit 7aa9d58
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions es6/tests/e2e/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,23 @@ const fixtures = [
result: '<w:t xml:space="preserve">- John- Mary</w:t>',
},

{
it: "should allow to call a function up one scope with angular expressions",
content: "<w:t>{#users}{hi(.)}{/}</w:t>",
...noInternals,
options: {
parser: expressionParser,
},
scope: {
hi(user) {
return `What's up, ${user} ?`;
},
users: ["John", "Jackie"],
},
result:
'<w:t xml:space="preserve">What&apos;s up, John ?What&apos;s up, Jackie ?</w:t>',
},

{
it: "should xmlparse strange tags",
content: "<w:t>{name} {</w:t>FOO<w:t>age</w:t>BAR<w:t>}</w:t>",
Expand Down

0 comments on commit 7aa9d58

Please sign in to comment.