UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

58 lines (57 loc) 1.75 kB
/** * DevExtreme (esm/__internal/grids/new/card_view/content_view/content/card/caption.test.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { createVNode, createComponentVNode } from "inferno"; import { describe, expect, it } from "@jest/globals"; import { render } from "inferno"; import { Caption } from "./caption"; describe("Content View", (() => { describe("Caption", (() => { it("should render title", (() => { const container = document.createElement("div"); render(createComponentVNode(2, Caption, { field: { column: { caption: "TEST_TITLE" } } }), container); expect(container).toMatchSnapshot() })); it("should render template with title", (() => { const container = document.createElement("div"); render(createComponentVNode(2, Caption, { field: { column: { caption: "TEST_TITLE" } }, template: _ref => { let { field: field } = _ref; return createVNode(1, "div", null, field.column.caption, 0, { "test-template": "true" }) } }), container); expect(container).toMatchSnapshot() })) })) }));