'use strict';

const parser = require('../parser');

function InMemory(partials) {
	this.partials = partials;
	this.compiledPartials = {};
}

InMemory.prototype.get = function (id) {
	if (this.compiledPartials.hasOwnProperty(id)) return this.compiledPartials[id];
	if (this.partials.hasOwnProperty(id)) {
		return this.compiledPartials[id] = parser(this.partials[id]);
	}
	return null;
};

module.exports = InMemory;

@@ -176,16 +176,77 @@
  (id) %7B%0A
+%09const compileTemplate = require('../../').compileTemplate;%0A%0A
 %09if (thi
@@ -396,16 +396,32 @@
 s%5Bid%5D = 
+compileTemplate(
 parser(t
@@ -437,16 +437,17 @@
 als%5Bid%5D)
+)
 ;%0A%09%7D%0A%09re

Update InMemory partials resolved to resolve compiled templates. This makes unit tests work again