about summary refs log tree commit diff
path: root/__tests__/view/shell/mobile/Composer.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to '__tests__/view/shell/mobile/Composer.test.tsx')
-rw-r--r--__tests__/view/shell/mobile/Composer.test.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/__tests__/view/shell/mobile/Composer.test.tsx b/__tests__/view/shell/mobile/Composer.test.tsx
new file mode 100644
index 000000000..7b84cfd88
--- /dev/null
+++ b/__tests__/view/shell/mobile/Composer.test.tsx
@@ -0,0 +1,23 @@
+import React from 'react'
+import {Composer} from '../../../../src/view/shell/mobile/Composer'
+import renderer from 'react-test-renderer'
+// import {render} from '../../../../jest/test-utils'
+
+describe('Composer', () => {
+  const mockedProps = {
+    active: true,
+    winHeight: 844,
+    replyTo: {
+      author: {avatar: undefined, displayName: 'Alice', handle: 'alice.test'},
+      cid: 'bafyreieucrv36ylxrut4dr4jj264q2jj2vt2vfvhjfchgw3vua4gksvzia',
+      text: 'Captain, maybe we ought to turn on the searchlights now. No… that’s just what they’ll be expecting us to do.',
+      uri: 'at://did:plc:v3xz273ea2dzjpu2szsjzfue/app.bsky.feed.post/3jkcir3fhqv2u',
+    },
+    onPost: jest.fn(),
+    onClose: jest.fn(),
+  }
+  it('renders correctly', () => {
+    const tree = renderer.create(<Composer {...mockedProps} />).toJSON()
+    expect(tree).toMatchSnapshot()
+  })
+})