forked from gzzfw/frontEnd/gzDyh

xusd
2024-09-18 3ae864f005e8a874de01c15e14b83196a3f6f11b
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();
});