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(); });