summaryrefslogtreecommitdiff
path: root/components/__tests__
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-08-28 15:53:21 +0200
committerSanto Cariotti <santo@dcariotti.me>2024-08-28 15:53:21 +0200
commit83643a78b73dee5610be6ad9837fb72e9b944cb7 (patch)
tree1eca6bad452656f78879c829181362f3b586d697 /components/__tests__
Initial commit
Generated by create-expo-app 3.0.0.
Diffstat (limited to 'components/__tests__')
-rw-r--r--components/__tests__/ThemedText-test.tsx10
-rw-r--r--components/__tests__/__snapshots__/ThemedText-test.tsx.snap24
2 files changed, 34 insertions, 0 deletions
diff --git a/components/__tests__/ThemedText-test.tsx b/components/__tests__/ThemedText-test.tsx
new file mode 100644
index 0000000..1ac3225
--- /dev/null
+++ b/components/__tests__/ThemedText-test.tsx
@@ -0,0 +1,10 @@
+import * as React from 'react';
+import renderer from 'react-test-renderer';
+
+import { ThemedText } from '../ThemedText';
+
+it(`renders correctly`, () => {
+ const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON();
+
+ expect(tree).toMatchSnapshot();
+});
diff --git a/components/__tests__/__snapshots__/ThemedText-test.tsx.snap b/components/__tests__/__snapshots__/ThemedText-test.tsx.snap
new file mode 100644
index 0000000..b68e53e
--- /dev/null
+++ b/components/__tests__/__snapshots__/ThemedText-test.tsx.snap
@@ -0,0 +1,24 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`renders correctly 1`] = `
+<Text
+ style={
+ [
+ {
+ "color": "#11181C",
+ },
+ {
+ "fontSize": 16,
+ "lineHeight": 24,
+ },
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ ]
+ }
+>
+ Snapshot test!
+</Text>
+`;