@salesforcedevs/dx-components
Advanced tools
Comparing version 0.0.9 to 0.0.10-beta.0
@@ -22,2 +22,3 @@ { | ||
"dx/textSection", | ||
"dx/tree", | ||
"dx/typeBadge", | ||
@@ -24,0 +25,0 @@ "dx/typeBadgeGroup" |
{ | ||
"name": "@salesforcedevs/dx-components", | ||
"version": "0.0.9", | ||
"version": "0.0.10-beta.0", | ||
"description": "DX Lightning web components", | ||
@@ -5,0 +5,0 @@ "license": "UNLICENSED", |
@@ -13,4 +13,4 @@ import { createElement } from "lwc"; | ||
describe("dx-button", () => { | ||
it("renders an empty button element with no icon", () => { | ||
const element = create(); | ||
it("renders an empty button element with no icon", async () => { | ||
const element = create({ ariaLabel: "Default" }); | ||
document.body.appendChild(element); | ||
@@ -22,6 +22,8 @@ | ||
expect(iconEl).toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("renders button defaults if no overrides are specified", () => { | ||
const element = create(); | ||
it("renders button defaults if no overrides are specified", async () => { | ||
const element = create({ ariaLabel: "Default" }); | ||
document.body.appendChild(element); | ||
@@ -37,2 +39,4 @@ | ||
expect(buttonElClasses).not.toContain("style--icon"); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -48,3 +52,3 @@ | ||
it("only shows a loading message when the component is in `loading` state", () => { | ||
it("only shows a loading message when the component is in `loading` state", async () => { | ||
const element = create({ loading: true, iconSymbol: "search" }); | ||
@@ -63,8 +67,16 @@ document.body.appendChild(element); | ||
expect(icon).toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("can display an icon with the expected settings", () => { | ||
it("can display an icon with the expected settings", async () => { | ||
const iconSize = "large"; | ||
const iconSymbol = "automate"; | ||
const element = create({ iconSize, iconSymbol, loading: false }); | ||
const ariaLabel = "Automate"; | ||
const element = create({ | ||
ariaLabel, | ||
iconSize, | ||
iconSymbol, | ||
loading: false | ||
}); | ||
document.body.appendChild(element); | ||
@@ -77,6 +89,11 @@ | ||
expect(iconEl.symbol).toBe(iconSymbol); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("displays a link when given an href", () => { | ||
const element = create({ href: "https://www.google.com" }); | ||
it("displays a link when given an href", async () => { | ||
const element = create({ | ||
ariaLabel: "Google", | ||
href: "https://www.google.com" | ||
}); | ||
document.body.appendChild(element); | ||
@@ -89,6 +106,8 @@ | ||
expect(buttonEl).toBeFalsy(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("applies correct font family class", () => { | ||
const element = create(); | ||
it("applies correct font family class", async () => { | ||
const element = create({ ariaLabel: "Default" }); | ||
document.body.appendChild(element); | ||
@@ -108,3 +127,5 @@ | ||
expect(classNameOther.includes("font--sans")).toBeTruthy(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -12,2 +12,3 @@ import { LightningElement, api } from "lwc"; | ||
export default class Button extends LightningElement { | ||
@api ariaLabel: string = ""; | ||
@api disabled: boolean | null = null; | ||
@@ -14,0 +15,0 @@ @api iconSize?: IconSize = "small"; |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card", () => { | ||
it("renders the icon, image, title, body, author, & badges", () => { | ||
it("renders the icon, image, title, body, author & badges", async () => { | ||
const element = create(mockProps); | ||
@@ -23,3 +23,3 @@ document.body.appendChild(element); | ||
"dx-type-badge-group", | ||
"h6", | ||
".dx-text-heading-6", | ||
"h4", | ||
@@ -30,5 +30,7 @@ ".dx-text-body-3" | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("doesn't render the icon, image, badges & author when it doesn't need to", () => { | ||
it("doesn't render the icon, image, badges & author when it doesn't need to", async () => { | ||
const element = create({ | ||
@@ -44,9 +46,11 @@ title: mockProps.title, | ||
"dx-type-badge-group", | ||
"h6" | ||
".dx-text-heading-6" | ||
].map((query) => element.shadowRoot.querySelector(query)); | ||
els.forEach((el) => expect(el).toBeNull()); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("applies correct default conditional classes", () => { | ||
it("applies correct default conditional classes", async () => { | ||
const element = create({ | ||
@@ -64,2 +68,4 @@ title: mockProps.title, | ||
].forEach((className) => expect(el.className).toContain(className)); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -66,0 +72,0 @@ |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-article", () => { | ||
it("renders the link, title, subtitle, body, badges", () => { | ||
it("renders the link, title, subtitle, body & badges", async () => { | ||
const element = create(mockProps); | ||
@@ -28,3 +28,5 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-callout", () => { | ||
it("renders the link, arrow icon, title, subtitle, label, & the graphic", () => { | ||
it("renders the link, arrow icon, title, subtitle, label & the graphic", async () => { | ||
const element = create(mockProps); | ||
@@ -29,5 +29,7 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("does not render ui irrelevant to the secondary variant", () => { | ||
it("does not render ui irrelevant to the secondary variant", async () => { | ||
const element = create({ | ||
@@ -44,5 +46,7 @@ ...mockProps, | ||
els.forEach((el) => expect(el).toBeNull()); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("does not render the graphic if not give a imgSrc", () => { | ||
it("does not render the graphic if not give a imgSrc", async () => { | ||
const element = create(mockPropsAlt); | ||
@@ -56,5 +60,7 @@ document.body.appendChild(element); | ||
els.forEach((el) => expect(el).toBeNull()); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("can apply conditional classes correctly via props", () => { | ||
it("can apply conditional classes correctly via props", async () => { | ||
const element = create({ | ||
@@ -71,3 +77,5 @@ ...mockProps, | ||
); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-icon", () => { | ||
it("renders the link, title, & icon", () => { | ||
it("renders the link, title & icon", async () => { | ||
const element = create(mockProps); | ||
@@ -24,5 +24,7 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("can apply conditional classes correctly via props", () => { | ||
it("can apply conditional classes correctly via props", async () => { | ||
const element = create({ ...mockProps, borderless: true }); | ||
@@ -33,3 +35,5 @@ document.body.appendChild(element); | ||
expect(el.className).toContain("is--borderless"); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-product", () => { | ||
it("renders the link, icon, title, body & badges", () => { | ||
it("renders the link, icon, title, body & badges", async () => { | ||
const element = create(mockProps); | ||
@@ -28,2 +28,4 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -30,0 +32,0 @@ |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-small", () => { | ||
it("renders the link, title & body", () => { | ||
it("renders the link, title & body", async () => { | ||
const element = create(mockProps); | ||
@@ -24,3 +24,5 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-tweet", () => { | ||
it("renders the link, image-and-label, body, button, ", () => { | ||
it("renders the link, image-and-label, body, button, ", async () => { | ||
const element = create(mockProps); | ||
@@ -27,3 +27,5 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-card-video-preview", () => { | ||
it("renders the link, title & image", () => { | ||
it("renders the link, title & image", async () => { | ||
const element = create(mockProps); | ||
@@ -24,2 +24,4 @@ document.body.appendChild(element); | ||
expect(els).not.toContain(null); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -26,0 +28,0 @@ |
@@ -24,3 +24,3 @@ import { createElement } from "lwc"; | ||
describe("dx-dropdown", () => { | ||
it("renders the container div when a targetElement is set", () => { | ||
it("renders the container div when a targetElement is set", async () => { | ||
const component = create(); | ||
@@ -30,5 +30,7 @@ document.body.appendChild(component); | ||
expect(menuEl).not.toBeNull(); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
it("renders all options", () => { | ||
it("renders all options", async () => { | ||
const component = create(); | ||
@@ -41,5 +43,7 @@ document.body.appendChild(component); | ||
expect(options.length).toEqual(mockOptions.length); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
it("renders all nested options", () => { | ||
it("renders all nested options", async () => { | ||
const component = create({ options: mockNestedOptions }); | ||
@@ -52,5 +56,7 @@ document.body.appendChild(component); | ||
expect(options.length).toEqual(count); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
it("value prop activates the selected option", () => { | ||
it("value prop activates the selected option", async () => { | ||
const component = create(); | ||
@@ -68,2 +74,4 @@ document.body.appendChild(component); | ||
expect(id).toEqual(selectedValue); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
@@ -90,2 +98,4 @@ | ||
expect(mockClose).toBeCalledTimes(1); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
@@ -109,3 +119,5 @@ | ||
expect(mockClose).not.toHaveBeenCalled(); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
}); |
@@ -20,2 +20,9 @@ import { createElement } from "lwc"; | ||
const appendToMenu = (element: HTMLElement) => { | ||
const menu = document.createElement("DIV"); | ||
document.body.appendChild(menu); | ||
menu.setAttribute("role", "menu"); | ||
menu.appendChild(element); | ||
}; | ||
describe("dx-dropdown-option", () => { | ||
@@ -26,3 +33,3 @@ const component = createElement("dx-dropdown-option", { | ||
it("renders a button by default", () => { | ||
it("renders a button by default", async () => { | ||
Object.assign(component, { | ||
@@ -36,5 +43,8 @@ option: buttonOption | ||
expect(optionEl).not.toBeNull(); | ||
appendToMenu(component); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
it("renders the correct label, description, and img", () => { | ||
it("renders the correct label, description, and img", async () => { | ||
Object.assign(component, { | ||
@@ -56,5 +66,8 @@ option: buttonOption | ||
expect(img).not.toBeNull(); | ||
appendToMenu(component); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
it("renders a link with the correct href when given link props", () => { | ||
it("renders a link with the correct href when given link props", async () => { | ||
Object.assign(component, { | ||
@@ -70,2 +83,5 @@ option: linkOption | ||
expect(href).toEqual(linkOption.link.href); | ||
appendToMenu(component); | ||
await expect(component).toBeAccessible(); | ||
}); | ||
@@ -72,0 +88,0 @@ |
@@ -13,3 +13,3 @@ import { createElement } from "lwc"; | ||
describe("dx-footer", () => { | ||
it("renders a footer", () => { | ||
it("renders a footer", async () => { | ||
const element = create(); | ||
@@ -20,3 +20,5 @@ document.body.appendChild(element); | ||
expect(footerEl).not.toBeNull(); | ||
await expect(footerEl).toBeAccessible(); | ||
}); | ||
}); |
@@ -47,5 +47,5 @@ export const generalLinks = [ | ||
export const socialLinks = [ | ||
{ href: "www.facebook.com", iconSymbol: "facebook" }, | ||
{ href: "www.twitter.com", iconSymbol: "twitter" }, | ||
{ href: "www.medium.com", iconSymbol: "medium" } | ||
{ href: "www.facebook.com", iconSymbol: "facebook", label: "Facebook" }, | ||
{ href: "www.twitter.com", iconSymbol: "twitter", label: "Twitter" }, | ||
{ href: "www.medium.com", iconSymbol: "medium", label: "Medium" } | ||
]; |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-group-content", () => { | ||
it("renders with passed in props", () => { | ||
it("renders with passed in props", async () => { | ||
const element = create({ | ||
@@ -32,2 +32,4 @@ ...mockProps | ||
expect(text.textContent).toEqual(mockProps.text); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -34,0 +36,0 @@ |
@@ -5,3 +5,3 @@ import { createElement } from "lwc"; | ||
describe("dx-header", () => { | ||
it("renders the nav", () => { | ||
it("renders the nav", async () => { | ||
const element = createElement("dx-header", { | ||
@@ -14,3 +14,5 @@ is: Header | ||
expect(headerEl).not.toBeNull(); | ||
await expect(headerEl).toBeAccessible(); | ||
}); | ||
}); |
@@ -13,5 +13,7 @@ import { createElement } from "lwc"; | ||
it("renders the correct number of nav-list-items", () => { | ||
it("renders the correct number of nav-list-items", async () => { | ||
expect(items.length).toBe(apps.length); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ export default [ | ||
link: { | ||
href: "/documentation", | ||
href: "/docs", | ||
target: null | ||
@@ -17,0 +17,0 @@ } |
@@ -11,3 +11,3 @@ import { createElement } from "lwc"; | ||
describe("dx-header-search", () => { | ||
it("renders the search input", () => { | ||
it("renders the search input", async () => { | ||
const element = create(); | ||
@@ -18,2 +18,4 @@ document.body.appendChild(element); | ||
expect(inputEl).not.toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -39,2 +41,4 @@ | ||
expect(button.textContent).toEqual(nextScope.label); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -55,3 +59,5 @@ | ||
}); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -10,3 +10,3 @@ import { createElement } from "lwc"; | ||
describe("dx-icon", () => { | ||
it("renders null when not given a symbol property", () => { | ||
it("renders null when not given a symbol property", async () => { | ||
const element = create(); | ||
@@ -17,5 +17,7 @@ document.body.appendChild(element); | ||
expect(svgEl).toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("renders an icon defaulted to size small", () => { | ||
it("renders an icon defaulted to size small", async () => { | ||
const element = create(); | ||
@@ -27,5 +29,7 @@ element.symbol = "search"; | ||
expect(svgEl.classList.contains("size--small")).toBe(true); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("renders the use element with the correct xlink:href", () => { | ||
it("renders the use element with the correct xlink:href", async () => { | ||
const element = create(); | ||
@@ -41,3 +45,5 @@ element.symbol = "audio"; | ||
); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-image-and-label", () => { | ||
it("renders with passed in props", () => { | ||
it("renders with passed in props", async () => { | ||
const element = create({ | ||
@@ -27,2 +27,4 @@ ...mockProps | ||
expect(label.textContent).toEqual(mockProps.label); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -29,0 +31,0 @@ |
@@ -13,4 +13,4 @@ import { createElement } from "lwc"; | ||
describe("dx-input", () => { | ||
it("renders an input", () => { | ||
const element = create(); | ||
it("renders an input", async () => { | ||
const element = create({ ariaLabel: "Default label" }); | ||
document.body.appendChild(element); | ||
@@ -20,2 +20,4 @@ | ||
expect(inputEl).not.toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -35,4 +37,4 @@ | ||
it("can render a specific icon", () => { | ||
const element = create({ iconSymbol: "search" }); | ||
it("can render a specific icon", async () => { | ||
const element = create({ ariaLabel: "Search", iconSymbol: "search" }); | ||
document.body.appendChild(element); | ||
@@ -46,2 +48,4 @@ | ||
expect(searchIcon).not.toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -59,3 +63,3 @@ | ||
it("renders submit button when given submit-label", async () => { | ||
const element = create({ submitLabel: "Submit" }); | ||
const element = create({ ariaLabel: "Search", submitLabel: "Submit" }); | ||
document.body.appendChild(element); | ||
@@ -65,6 +69,8 @@ | ||
expect(buttonEl).not.toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("fires onsubmit when enter pressed or submit button clicked", async () => { | ||
const element = create({ submitLabel: "Submit" }); | ||
const element = create({ ariaLabel: "Search", submitLabel: "Submit" }); | ||
const submitMock = jest.fn(); | ||
@@ -86,6 +92,8 @@ element.addEventListener("submit", submitMock); | ||
expect(submitMock).toHaveBeenCalledTimes(2); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("fires onchange when input changes", async () => { | ||
const element = create({ submitLabel: "Submit" }); | ||
const element = create({ ariaLabel: "Search", submitLabel: "Submit" }); | ||
const changeMock = jest.fn(); | ||
@@ -103,6 +111,8 @@ element.addEventListener("change", changeMock); | ||
expect(changeMock.mock.calls[0][0].detail).toEqual("test"); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("value can be controlled", async () => { | ||
const element = create({ value: "test" }); | ||
const element = create({ ariaLabel: "Search", value: "test" }); | ||
document.body.appendChild(element); | ||
@@ -113,6 +123,12 @@ | ||
expect(inputEl.value).toEqual("test"); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("applies disabled correctly", async () => { | ||
const element = create({ submitLabel: "submit", disabled: true }); | ||
const element = create({ | ||
ariaLabel: "Search", | ||
submitLabel: "submit", | ||
disabled: true | ||
}); | ||
document.body.appendChild(element); | ||
@@ -124,2 +140,4 @@ | ||
expect(inputEl.disabled && buttonEl.disabled).toBeTruthy(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -126,0 +144,0 @@ |
@@ -15,3 +15,3 @@ import { createElement } from "lwc"; | ||
document.body.appendChild(element); | ||
it("renders", () => { | ||
it("renders", async () => { | ||
const container: HTMLElement = element.shadowRoot.querySelector( | ||
@@ -21,3 +21,5 @@ ".layout-grid" | ||
expect(container).not.toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -17,42 +17,31 @@ import { createElement } from "lwc"; | ||
document.body.appendChild(element); | ||
it("renders", () => { | ||
const container: HTMLElement = element.shadowRoot.querySelector( | ||
".text-section" | ||
); | ||
expect(container).not.toBeNull(); | ||
}); | ||
it("renders title", () => { | ||
const renderedTitle: HTMLElement = element.shadowRoot.querySelector( | ||
it("renders", async () => { | ||
const titleEl: HTMLElement = element.shadowRoot.querySelector( | ||
".text-section h2" | ||
); | ||
expect(renderedTitle).not.toBeNull(); | ||
expect(renderedTitle.textContent).toEqual(element.title); | ||
}); | ||
it("renders text-section__by", () => { | ||
const bySection: HTMLElement = element.shadowRoot.querySelector( | ||
const bySectionEl: HTMLElement = element.shadowRoot.querySelector( | ||
".text-section .text-section__by" | ||
); | ||
expect(bySection).not.toBeNull(); | ||
}); | ||
it("render text-section__button-group", () => { | ||
const container: HTMLElement = element.shadowRoot.querySelector( | ||
expect(bySectionEl).not.toBeNull(); | ||
const buttonGroupEl: HTMLElement = element.shadowRoot.querySelector( | ||
".text-section .text-section__button-group" | ||
); | ||
expect(container).not.toBeNull(); | ||
}); | ||
it("render buttons", () => { | ||
const buttonsList: Array<Button> = element.shadowRoot.querySelectorAll( | ||
const buttonEls: Array<Button> = element.shadowRoot.querySelectorAll( | ||
"dx-button" | ||
); | ||
expect(buttonsList).toHaveLength(3); | ||
expect(buttonsList[2].variant).toEqual("secondary"); | ||
}); | ||
it("render body", () => { | ||
const renderedBody: HTMLElement = element.shadowRoot.querySelector( | ||
const bodyEl: HTMLElement = element.shadowRoot.querySelector( | ||
".text-section .dx-text-body-1" | ||
); | ||
expect(renderedBody).not.toBeNull(); | ||
expect(renderedBody.textContent).toEqual(element.body); | ||
expect(titleEl).not.toBeNull(); | ||
expect(titleEl.textContent).toEqual(element.title); | ||
expect(buttonGroupEl).not.toBeNull(); | ||
expect(buttonEls).toHaveLength(3); | ||
expect(buttonEls[2].variant).toEqual("secondary"); | ||
expect(bodyEl).not.toBeNull(); | ||
expect(bodyEl.textContent).toEqual(element.body); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
}); |
@@ -13,3 +13,3 @@ import { createElement } from "lwc"; | ||
describe("dx-type-badge", () => { | ||
it("renders", () => { | ||
it("renders", async () => { | ||
const element = create(); | ||
@@ -19,5 +19,7 @@ document.body.appendChild(element); | ||
expect(el).not.toBeNull(); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
it("renders medium class by default", () => { | ||
it("renders medium class by default", async () => { | ||
const element = create(); | ||
@@ -27,2 +29,4 @@ document.body.appendChild(element); | ||
expect(el.className).toContain("size--medium"); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -29,0 +33,0 @@ |
@@ -14,3 +14,3 @@ import { createElement } from "lwc"; | ||
describe("dx-type-badge-group", () => { | ||
it("renders correct number of badges", () => { | ||
it("renders correct number of badges", async () => { | ||
const element = create(mockProps); | ||
@@ -20,2 +20,4 @@ document.body.appendChild(element); | ||
expect(els.length).toEqual(badges.length); | ||
await expect(element).toBeAccessible(); | ||
}); | ||
@@ -22,0 +24,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1375970
178
6441
0