[new feature] IndexBar: add sticky prop (#3402)

This commit is contained in:
neverland
2019-05-30 11:50:09 +08:00
committed by GitHub
parent 74124246f6
commit 82134fe402
14 changed files with 263 additions and 60 deletions
+9 -1
View File
@@ -13,8 +13,12 @@ const empty = {
Vue.component('demo-block', empty);
Vue.component('demo-section', empty);
export default function (Demo: any) {
export default function (Demo: any, option: any = {}) {
test('renders demo correctly', async () => {
if (option.hookBeforeTest) {
option.hookBeforeTest();
}
if (Demo.i18n) {
Locale.add(Demo.i18n);
}
@@ -24,5 +28,9 @@ export default function (Demo: any) {
await later();
expect(wrapper).toMatchSnapshot();
if (option.hookAfterTest) {
option.hookAfterTest();
}
});
}