derby-templates improvement

17 views
Skip to first unread message

Artur Zayats

unread,
Jun 2, 2016, 3:17:40 AM6/2/16
to Derby
I made a PR for derby-templates - https://github.com/derbyjs/derby-templates/pull/15

It fixes some lacks in derby-parser and derby-templates.

After the commit the derby-parsing tests passed correctly:

  it('gets method call of the result of an fn expressions', function() {
    var expression = create('passThrough(_page.date).valueOf()');
    expect(expression.get(context)).to.equal(1000);
  });
  it('gets method call of the result of a `new` expressions', function() {
    var expression = create('new Date(1000).valueOf()');
    expect(expression.get(context)).to.equal(1000);
  });
  it('gets method call of a scoped model expression', function() {
    var expression = create('$at(_page.nums[3]).path()');
    expect(expression.get(context)).to.equal('_page.nums.3');
  });

Here is the corresponding derby-parsing PR - derbyjs/derby-parsing#14

P.S. for sure it doesn't break anything. All the tests passed.

Waiting for feedback. What do you think, @nateps?

Reply all
Reply to author
Forward
0 new messages