Skip to content

Commit a856ce0

Browse files
authored
test: Replace variable RN version in snapshot tests (#2659)
* test: Replace variable RN version in snapshot tests * Allow for missing patch version
1 parent 4ee6255 commit a856ce0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

__e2e__/__snapshots__/config.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`shows up current config without unnecessary output 1`] = `
44
{
55
"root": "<<REPLACED_ROOT>>/TestProject",
66
"reactNativePath": "<<REPLACED_ROOT>>/TestProject/node_modules/react-native",
7-
"reactNativeVersion": "0.78",
7+
"reactNativeVersion": "<<REPLACED>>",
88
"dependencies": {},
99
"commands": [
1010
{

__e2e__/config.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ test('shows up current config without unnecessary output', () => {
7070
options: command.options && ['<<REPLACED>>'],
7171
}));
7272

73+
expect(parsedStdout.reactNativeVersion).toMatch(/^\d+\.\d+(\.\d+)?$/);
74+
parsedStdout.reactNativeVersion = '<<REPLACED>>';
75+
7376
const expectedXcodeProject =
7477
process.platform === 'darwin'
7578
? {

0 commit comments

Comments
 (0)