Skip to content

Commit

Permalink
chore: fix tests to host component names
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagobrez authored and mdjastrzebski committed Aug 24, 2023
1 parent 2e2fdff commit dae1a38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ test('resetToDefaults() resets config to defaults', () => {

test('resetToDefaults() resets internal config to defaults', () => {
configureInternal({
hostComponentNames: { text: 'A', textInput: 'A', switch: 'A' },
hostComponentNames: { text: 'A', textInput: 'A', switch: 'A', modal: 'A' },
});
expect(getConfig().hostComponentNames).toEqual({
text: 'A',
textInput: 'A',
switch: 'A',
modal: 'A',
});

resetToDefaults();
Expand Down
6 changes: 6 additions & 0 deletions src/__tests__/host-component-names.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ describe('getHostComponentNames', () => {
text: 'banana',
textInput: 'banana',
switch: 'banana',
modal: 'banana',
},
});

expect(getHostComponentNames()).toEqual({
text: 'banana',
textInput: 'banana',
switch: 'banana',
modal: 'banana',
});
});

Expand All @@ -40,6 +42,7 @@ describe('getHostComponentNames', () => {
text: 'Text',
textInput: 'TextInput',
switch: 'RCTSwitch',
modal: 'Modal',
});
expect(getConfig().hostComponentNames).toBe(hostComponentNames);
});
Expand Down Expand Up @@ -68,6 +71,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
text: 'Text',
textInput: 'TextInput',
switch: 'RCTSwitch',
modal: 'Modal',
});
});

Expand All @@ -77,6 +81,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
text: 'banana',
textInput: 'banana',
switch: 'banana',
modal: 'banana',
},
});

Expand All @@ -86,6 +91,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
text: 'banana',
textInput: 'banana',
switch: 'banana',
modal: 'banana',
});
});

Expand Down

0 comments on commit dae1a38

Please sign in to comment.