forked from gzzfw/frontEnd/gzDyh

dminyi
2024-08-09 a2a5220469a3e1f8bc216f47c887ca4c941920b0
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();
});