devextreme-vue
Version:
DevExtreme Vue UI and Visualization Components
49 lines (47 loc) • 1.68 kB
JavaScript
/*!
* devextreme-vue
* Version: 25.1.6
* Build date: Mon Oct 13 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-vue
*/
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const test_utils_1 = require("@vue/test-utils");
const vue_1 = require("vue");
const select_box_1 = __importDefault(require("../../select-box"));
const text_box_1 = __importDefault(require("../../text-box"));
jest.setTimeout(1000);
beforeEach(() => {
jest.clearAllMocks();
});
describe('template rendering', () => {
it('field template rendered', () => {
const vm = (0, vue_1.defineComponent)({
template: `<dx-select-box :data-source="dataSource" field-template="field" id="component">
<template #field="">
<dx-text-box value="text" />
</template>
</dx-select-box >`,
data() {
return {
dataSource: [{ ID: 1 }],
};
},
components: {
DxSelectBox: select_box_1.default,
DxTextBox: text_box_1.default,
},
});
const wrapper = (0, test_utils_1.mount)(vm);
expect(wrapper.getComponent('#component').vm.$el.children).toHaveLength(1);
});
});