Skip to content

Commit 7d8077a

Browse files
committed
test: mock package.json to avoid version changes in snapshot
1 parent 9c0d0df commit 7d8077a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/react-native-builder-bob/src/__tests__/__snapshots__/init.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`initializes the configuration 1`] = `
55
"name": "library",
66
"version": "1.0.0",
77
"devDependencies": {
8-
"react-native-builder-bob": "^0.38.1"
8+
"react-native-builder-bob": "^0.5.0"
99
},
1010
"exports": {
1111
".": {

packages/react-native-builder-bob/src/__tests__/init.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { stdin } from 'mock-stdin';
55
import { join } from 'path';
66
import { init } from '../init';
77

8+
jest.mock('../../package.json', () => ({
9+
name: 'react-native-builder-bob',
10+
version: '0.5.0',
11+
}));
12+
813
let io: ReturnType<typeof stdin> | undefined;
914

1015
const root = '/path/to/library';

0 commit comments

Comments
 (0)