react-native-navigation的迁移库

env.test.js 374B

1234567891011121314
  1. describe('test environment', () => {
  2. it('handles object spread', () => {
  3. const { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
  4. expect(x).toEqual(1);
  5. expect(y).toEqual(2);
  6. expect(z).toEqual({ a: 3, b: 4 });
  7. });
  8. it('handles async await', async () => {
  9. const result = await new Promise((r) => r('hello'));
  10. expect(result).toEqual('hello');
  11. });
  12. });