From d212883c5e50cf70e213c7e4c6e251995a5d1469 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Fri, 13 Nov 2020 23:43:27 +0800 Subject: [PATCH] test(CellGroup): update test cases --- src/cell-group/test/__snapshots__/index.spec.js.snap | 8 ++++++++ src/cell-group/test/index.spec.js | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/cell-group/test/__snapshots__/index.spec.js.snap create mode 100644 src/cell-group/test/index.spec.js diff --git a/src/cell-group/test/__snapshots__/index.spec.js.snap b/src/cell-group/test/__snapshots__/index.spec.js.snap new file mode 100644 index 000000000..1906c7655 --- /dev/null +++ b/src/cell-group/test/__snapshots__/index.spec.js.snap @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render title slot and match snapshot 1`] = ` +
Custom Title
+
+ +
+`; diff --git a/src/cell-group/test/index.spec.js b/src/cell-group/test/index.spec.js new file mode 100644 index 000000000..51b232904 --- /dev/null +++ b/src/cell-group/test/index.spec.js @@ -0,0 +1,12 @@ +import CellGroup from '..'; +import { mount } from '@vue/test-utils'; + +test('should render title slot and match snapshot', () => { + const wrapper = mount(CellGroup, { + slots: { + title: () => 'Custom Title', + }, + }); + + expect(wrapper.html()).toMatchSnapshot(); +});