Skip to content

Commit

Permalink
test(preview): update message snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Feb 17, 2023
1 parent feb07b6 commit 4da1bab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 9 additions & 2 deletions tests/actions/preview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe(createSummary, () => {
- Project → **fake-project**
- Platforms → **android**, **ios**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
Expand All @@ -61,6 +62,7 @@ describe(createSummary, () => {
- Project → **fake-project**
- Platform → **android**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
Expand All @@ -76,6 +78,7 @@ describe(createSummary, () => {
- Project → **fake-project**
- Platform → **ios**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
Expand All @@ -86,12 +89,14 @@ describe(createSummary, () => {

describe('mutliple update groups', () => {
it('returns expected message for both platforms', () => {
expect(createSummary(fakeUpdatesMultiple, getVariables(fakeExpoConfig, fakeUpdatesMultiple))).toMatchInlineSnapshot(`
expect(createSummary(fakeUpdatesMultiple, getVariables(fakeExpoConfig, fakeUpdatesMultiple)))
.toMatchInlineSnapshot(`
"🚀 Expo preview is ready!
- Project → **fake-project**
- Platforms → **android**, **ios**
Android <br /> _(exposdk:47.0.0)_ | iOS <br /> _(exposdk:47.0.0)_
Android <br /> _(exposdk:47.0.0)_ <br /> **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-fake-android-id)** | iOS <br /> _(exposdk:47.0.0)_ <br /> **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-fake-ios-id)**
--- | ---
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-fake-android-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-fake-android-id" width="250px" height="250px" /></a> | <a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-fake-ios-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-fake-ios-id" width="250px" height="250px" /></a>
Expand All @@ -107,6 +112,7 @@ describe(createSummary, () => {
- Project → **fake-project**
- Platform → **android**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
Expand All @@ -122,6 +128,7 @@ describe(createSummary, () => {
- Project → **fake-project**
- Platform → **ios**
- Runtime Version → **exposdk:47.0.0**
- **[More info](https://expo.dev/projects/fake-project-id/updates/fake-group-id)**
<a href="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id"><img src="https://qr.expo.dev/eas-update?projectId=fake-project-id&groupId=fake-group-id" width="250px" height="250px" /></a>
Expand Down
1 change: 0 additions & 1 deletion tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ describe(templateLiteral, () => {
it('handles string variables', () => {
expect(templateLiteral('Hello, {name}!', { name: 'World' })).toBe('Hello, World!');
});

});

0 comments on commit 4da1bab

Please sign in to comment.