From df7b7a782f17dfa80b563cf9ba56a6b63f824a98 Mon Sep 17 00:00:00 2001 From: nemo-shen Date: Mon, 13 Dec 2021 01:11:48 +0800 Subject: [PATCH] fix(demo): update demo snapshot --- packages/calendar/test/demo.spec.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/calendar/test/demo.spec.ts b/packages/calendar/test/demo.spec.ts index 48f5c77b..4c3798cb 100644 --- a/packages/calendar/test/demo.spec.ts +++ b/packages/calendar/test/demo.spec.ts @@ -2,14 +2,10 @@ import path from 'path'; import simulate from 'miniprogram-simulate'; test('should render demo and match snapshot', () => { - try { - const id = simulate.load(path.resolve(__dirname, '../demo/index'), { - rootPath: path.resolve(__dirname, '../../'), - }); - const comp = simulate.render(id); - comp.attach(document.createElement('parent-wrapper')); - expect(comp.toJSON()).toMatchSnapshot(); - } catch (e) { - console.error(e); - } + const id = simulate.load(path.resolve(__dirname, '../demo/index'), { + rootPath: path.resolve(__dirname, '../../'), + }); + const comp = simulate.render(id); + comp.attach(document.createElement('parent-wrapper')); + expect(comp.toJSON()).toMatchSnapshot(); });