Skip to content

Commit

Permalink
chore: log errors on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Dec 10, 2023
1 parent edd6721 commit 7d84143
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/templateParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe("parseTemplate", () => {
it("should parse a valid template with several variables", () => {
const template = "Hello, {{name}}! You are {{age}} years old.";
const result = parseTemplate(template);
logError(result);
expect(result).toEqual(E.of(
[
{ _tag: "text", value: "Hello, " },
Expand All @@ -58,6 +59,7 @@ describe("parseTemplate", () => {
it("should allow single braces in a template", () => {
const template = "This is code {bla}";
const result = parseTemplate(template);
logError(result);
expect(result).toEqual(E.of(
[
{ _tag: "text", value: "This is code {bla}" },
Expand All @@ -67,6 +69,7 @@ describe("parseTemplate", () => {
it("should allow single braces in a template even if it has variables", () => {
const template = "This is code {bla} {{name}}";
const result = parseTemplate(template);
logError(result);
expect(result).toEqual(E.of(
[
{ _tag: "text", value: "This is code {bla} " },
Expand All @@ -91,6 +94,7 @@ describe("parseTemplate", () => {
it("should allow spaces within open and close braces", () => {
const template = "Hey, {{ name }}!";
const result = parseTemplate(template);
logError(result);
expect(result).toEqual(E.of(
[
{ _tag: "text", value: "Hey, " },
Expand Down

0 comments on commit 7d84143

Please sign in to comment.