File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [` NLoader renders correctly 1` ] = ` <span class = " loadding" ><div style = " height: 36px; width: 36px;" ></div ><span class = " loadding-text md-text" ></span ></span >` ;
Original file line number Diff line number Diff line change 1+ import NLoader from '../../packages/n-loader' ;
2+ import { mount } from '@vue/test-utils' ;
3+
4+ describe ( 'NLoader' , ( ) => {
5+ it ( 'renders correctly' , ( ) => {
6+ const wrapper = mount ( {
7+ render ( ) {
8+ return < NLoader show = { true } /> ;
9+ }
10+ } ) ;
11+ expect ( wrapper . html ( ) ) . toMatchSnapshot ( ) ;
12+ } ) ;
13+ it ( 'render size correctly' , ( ) => {
14+ const wrapper = mount ( {
15+ render ( ) {
16+ return < NLoader size = "lg" show = { true } /> ;
17+ }
18+ } ) ;
19+ expect ( wrapper . find ( '.lg-text' ) . exists ( ) ) . toBe ( true ) ;
20+ } ) ;
21+ it ( 'render chinese characters correctly' , ( ) => {
22+ const wrapper = mount ( {
23+ render ( ) {
24+ return < NLoader show = { true } loaddingText = "加载中" /> ;
25+ }
26+ } ) ;
27+ expect ( wrapper . text ( ) ) . toBe ( '加载中' ) ;
28+ } ) ;
29+ } ) ;
You can’t perform that action at this time.
0 commit comments