forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-06 381cf359d6368765d8c1b169a1a5572f40d814e3
1
2
3
4
5
6
7
8
9
10
11
import path from 'path';
import simulate from 'miniprogram-simulate';
 
test('should render demo and match snapshot', () => {
  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();
});