Skip to content

Commit

Permalink
Test name
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Jan 13, 2025
1 parent 54d3825 commit 73712fa
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions js/src/tests/jestlike/jest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ls.describe(
.toBeGreaterThanOrEqual(0.5);
ls.logFeedback({
key: "coolness",
score: 0.5,
score: 0.9,
});
ls.logOutput({
bar: "perfect",
Expand All @@ -64,6 +64,10 @@ ls.describe(
return { bar: "goodval" };
};
const res = myApp();
ls.logFeedback({
key: "coolness",
score: 0.8,
});
await ls
.expect(res)
.evaluatedBy(myEvaluator)
Expand All @@ -80,6 +84,10 @@ ls.describe(
return { bar: "bad" };
};
const res = myApp();
ls.logFeedback({
key: "coolness",
score: 0,
});
await ls
.expect(res)
.evaluatedBy(myEvaluator)
Expand Down Expand Up @@ -112,6 +120,10 @@ ls.describe(
const myApp = () => {
return { bar: "bad" };
};
ls.logFeedback({
key: "coolness",
score: 0.2,
});
const res = myApp();
await ls
.expect(res)
Expand All @@ -120,7 +132,7 @@ ls.describe(
return res;
});

test("Should test absolute closeness custom matcher", async () => {
test("Absolute closeness custom matcher", async () => {
await ls.expect("foobar").toBeAbsoluteCloseTo("foobaz", {
threshold: 3,
});
Expand All @@ -132,7 +144,7 @@ ls.describe(
});
});

test("Should test relative closeness custom matcher", async () => {
test("Relative closeness custom matcher", async () => {
await ls.expect("0123456789").toBeRelativeCloseTo("1123456789", {
threshold: 0.1,
});
Expand Down

0 comments on commit 73712fa

Please sign in to comment.