Skip to content
Open
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
2 changes: 1 addition & 1 deletion jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module.exports = {
// node specific transforms only
return babelTransformSync(src, {
filename: file,
sourceType: 'script',
sourceType: 'unambiguous',
...nodeBabelOptions,
plugins: [
...(nodeBabelOptions.plugins ?? []),
Expand Down
26 changes: 26 additions & 0 deletions packages/metro-config/src/__tests__/index-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/

import {getDefaultConfig} from '..';

describe('getDefaultConfig', () => {
test('treats internal React Native modules as third party', () => {
const {serializer} = getDefaultConfig(__dirname);

expect(
serializer.isThirdPartyModule({
path: '/app/packages/react-native/Libraries/Core/ExceptionsManager.js',
}),
).toBe(true);
expect(serializer.isThirdPartyModule({path: '/app/src/App.js'})).toBe(
false,
);
});
});
Loading