import "@testing-library/jest-dom";
import { hidingDateTagsForJpLocale } from "../utils";

describe("Test utils", () => {
  it.concurrent("it should test when hideDateTagsForJpLocale is available", () => {
    const result = hidingDateTagsForJpLocale(true, { name: "店舗名" }, [], { name: "店舗名" });
    expect(result).toEqual([{name: "店舗名"}]);
  });
  it.concurrent("it should test date format which we dont want to show", () => {
    const result = hidingDateTagsForJpLocale(true, { name: "mm/dd/yyyy" }, [], { name: "mm/dd/yyyy" });
    expect(result).toEqual([]);
  });
  it.concurrent("it should test when val name is not available", () => {
    const result = hidingDateTagsForJpLocale(false, { name: "店舗名" }, [], { name: "店舗名" });
    expect(result).toEqual([{name: "店舗名"}]);
  });
});
