Skip to content

Commit 1f3cf6b

Browse files
chrfalchclaude
andcommitted
fix(spm): lint/flow cleanup in the flavored-frameworks tests
sort-imports + prettier formatting, and explicit type args on jest.requireActual (underconstrained under newer Flow). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a0c7f92 commit 1f3cf6b

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

packages/react-native/scripts/spm/__tests__/flavored-frameworks-plist-dep-test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jest.mock('plist', () => {
2626
// destructures execFileSync at require time (same pattern the old
2727
// swap-flavor-test used).
2828
jest.mock('child_process', () => {
29-
const actual = jest.requireActual('child_process');
29+
const actual = jest.requireActual<$FlowFixMe>('child_process');
3030
return {
3131
...actual,
3232
execFileSync: (cmd, args, opts) => {
3333
if (cmd === 'plutil') {
3434
const fs = require('fs');
35-
const plist = jest.requireActual('plist');
35+
const plist = jest.requireActual<$FlowFixMe>('plist');
3636
const file = args[args.length - 1];
3737
return Buffer.from(
3838
JSON.stringify(plist.parse(fs.readFileSync(file, 'utf8'))),
@@ -46,7 +46,8 @@ jest.mock('child_process', () => {
4646
const fs = require('fs');
4747
const os = require('os');
4848
const path = require('path');
49-
const realPlist = jest.requireActual('plist');
49+
50+
const realPlist = jest.requireActual<$FlowFixMe>('plist');
5051

5152
function makeXcframework(root /*: string */) /*: string */ {
5253
const xcframework = path.join(root, 'React.xcframework');

packages/react-native/scripts/spm/__tests__/flavored-frameworks-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jest.mock('child_process', () => {
2424
const plistActual = jest.requireActual('plist');
2525
const file = args[args.length - 1];
2626
return Buffer.from(
27-
JSON.stringify(plistActual.parse(fsActual.readFileSync(file, 'utf8'))),
27+
JSON.stringify(
28+
plistActual.parse(fsActual.readFileSync(file, 'utf8')),
29+
),
2830
);
2931
}
3032
return actual.execFileSync(cmd, args, opts);

0 commit comments

Comments
 (0)