Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ declare var performance: Performance;
*/
const MEMORY_LIMITS_KB = {
environmentSetup: {
dev: 1000,
opt: 500,
dev: 1300,
opt: 700,
},
basicSurfaceRender: {
dev: 1200,
opt: 700,
dev: 1700,
opt: 900,
},
};

Expand Down
9 changes: 7 additions & 2 deletions private/react-native-fantom/runner/getFantomTestConfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import type {FeatureFlagValue} from '../../../packages/react-native/scripts/featureflags/types';

import ReactNativeFeatureFlags from '../../../packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config';
import * as EnvironmentOptions from './EnvironmentOptions';
import {HermesVariant} from './utils';
// $FlowExpectedError[untyped-import]
import {extract, parse} from 'jest-docblock';
Expand Down Expand Up @@ -59,7 +60,9 @@ export const FantomTestConfigHermesVariant = HermesVariant;
export const DEFAULT_IS_NATIVE_OPTIMIZED: boolean = false;
export const DEFAULT_IS_JS_OPTIMIZED: boolean = false;
export const DEFAULT_IS_JS_BYTECODE: boolean = false;
export const DEFAULT_HERMES_VARIANT: HermesVariant = HermesVariant.Hermes;
export const DEFAULT_OSS_HERMES_VARIANT: HermesVariant = HermesVariant.Hermes;
export const DEFAULT_HERMES_VARIANT: HermesVariant =
HermesVariant.StaticHermesStable;

export const DEFAULT_FEATURE_FLAGS: FantomTestConfigFeatureFlags = {
common: {},
Expand Down Expand Up @@ -170,7 +173,9 @@ export default function getFantomTestConfigs(
isNativeOptimized: DEFAULT_IS_NATIVE_OPTIMIZED,
isJsOptimized: DEFAULT_IS_JS_OPTIMIZED,
isJsBytecode: DEFAULT_IS_JS_BYTECODE,
hermesVariant: DEFAULT_HERMES_VARIANT,
hermesVariant: EnvironmentOptions.isOSS
? DEFAULT_OSS_HERMES_VARIANT
: DEFAULT_HERMES_VARIANT,
flags: {
common: {
...DEFAULT_FEATURE_FLAGS.common,
Expand Down
2 changes: 1 addition & 1 deletion private/react-native-fantom/runner/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function getBuckOptionsForHermes(
: [];
switch (variant) {
case HermesVariant.Hermes:
return baseOptions;
return [...baseOptions, '-c hermes.static_hermes=legacy'];
case HermesVariant.StaticHermesStable:
return [...baseOptions, '-c hermes.static_hermes=stable'];
case HermesVariant.StaticHermesExperimental:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ exports[`expect toMatchSnapshot() complex types 7`] = `[Error]`;

exports[`expect toMatchSnapshot() complex types 8`] = `/asd/`;

exports[`expect toMatchSnapshot() complex types 9`] = `
Promise {
"_h": 0,
"_i": 0,
"_j": null,
"_k": null,
}
`;

exports[`expect toMatchSnapshot() named snapshots: named snapshot 1`] = `
Object {
"a": "b",
Expand Down
3 changes: 2 additions & 1 deletion private/react-native-fantom/src/__tests__/expect-itest.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ describe('expect', () => {
expect(new Date('2025-01-02')).toMatchSnapshot();
expect(new Error()).toMatchSnapshot();
expect(new RegExp('asd')).toMatchSnapshot();
expect(new Promise(() => {})).toMatchSnapshot();
// TODO(T245412835): uncomment this once we support Hermes V1 in OSS fantom.
// expect(new Promise(() => {})).toMatchSnapshot();
});

test('named snapshots', () => {
Expand Down
Loading