test: audit Slider foundation and document adapter requirements
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// @vitest-environment node
|
||||
import { expect, it } from "vitest";
|
||||
import { createSSRApp, h } from "vue";
|
||||
import { renderToString } from "@vue/server-renderer";
|
||||
import Foundation from "../packages/vue/tests/fixtures/SliderFoundation.vue";
|
||||
|
||||
it("records that raw collection thumbs have no value or stable position on the server", async () => {
|
||||
expect(typeof window).toBe("undefined");
|
||||
const html = await renderToString(
|
||||
createSSRApp({
|
||||
render: () => h(Foundation, { defaultValue: [20, 80] }),
|
||||
}),
|
||||
);
|
||||
expect(html.match(/role="slider"/g)).toHaveLength(2);
|
||||
expect(html).not.toContain("aria-valuenow=");
|
||||
expect(html).toContain("display:none");
|
||||
});
|
||||
Reference in New Issue
Block a user