Skip to content

bug: cache actually not working #663

@aruku7230

Description

@aruku7230

When parsing a template with the same tags second time, because of cache, it should return the cached tokens.

test code:

  describe('when parsing a template with the same tags second time, return the cached tokens', function () {
    it('returns the same tokens for the latter parse', function () {
      var template = '{{foo}}[bar]';
      var parsedResult1 = Mustache.parse(template);
      var parsedResult2 = Mustache.parse(template);

      assert.deepEqual(parsedResult1, parsedResult2);
      assert.ok(parsedResult1 === parsedResult2);
    });
  });

test code failed on assert.ok(parsedResult1 === parsedResult2);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions