Skip to content

Commit

Permalink
chore(test): relative path test
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Sep 20, 2024
1 parent 177cfe8 commit c43f216
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
storyblokEditable,
renderRichText,
isRichTextEmpty,
} from "@storyblok/js";
} from "../";
import { describe, it, expect, vi, afterEach } from "vitest";

import richTextFixture from "../fixtures/richTextObject.json";
Expand Down Expand Up @@ -72,18 +72,18 @@ describe("@storyblok/js", () => {
it("should return true when passing an empty or invalid RichText object", () => {
storyblokInit({ accessToken: "wANpEQEsMYGOwLxwXQ76Ggtt", bridge: false });
expect(isRichTextEmpty(emptyRichTextFixture)).toBe(true);
})
});
it("should return false when passing a valid RichText object", () => {
storyblokInit({ accessToken: "wANpEQEsMYGOwLxwXQ76Ggtt", bridge: false });
expect(isRichTextEmpty(richTextFixture)).toBe(false);
})
});
it("should return true when passing a falsy value", () => {
storyblokInit({ accessToken: "wANpEQEsMYGOwLxwXQ76Ggtt", bridge: false });
expect(isRichTextEmpty("")).toBe(true);
})
})
});
});

// TODO: This might change when legacy rich text resolver is removed and
// TODO: This might change when legacy rich text resolver is removed and
// the new rich text resolver is implemented instead
describe("Legacy Rich Text Resolver", () => {
it("should return the rendered HTML when passing a valid RichText object", () => {
Expand Down

0 comments on commit c43f216

Please sign in to comment.