Skip to content

Commit

Permalink
Run mustache spec using expectTemplate()
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Apr 26, 2020
1 parent f58b31e commit 43d4427
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions spec/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,12 @@ describe('spec', function() {
/* eslint-enable no-eval */
}
it(name + ' - ' + test.name, function() {
if (test.partials) {
shouldCompileToWithPartials(
test.template,
[data, {}, test.partials, true],
true,
test.expected,
test.desc + ' "' + test.template + '"'
);
} else {
shouldCompileTo(
test.template,
[data, {}, {}, true],
test.expected,
test.desc + ' "' + test.template + '"'
);
}
expectTemplate(test.template)
.withInput(data)
.withPartials(test.partials || {})
.withCompileOptions({ compat: true })
.withMessage(test.desc + ' "' + test.template + '"')
.toCompileTo(test.expected);
});
});
});
Expand Down

0 comments on commit 43d4427

Please sign in to comment.