Skip to content

Commit b6a9efe

Browse files
committed
fix: fix typo when checking extensions
1 parent 1f98de6 commit b6a9efe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { transformFileAsync } from '@babel/core';
33
import fs from 'node:fs';
44
import path from 'node:path';
55

6-
it.each(['imports', 'exports'])(`adds .js extension to %s`, async (name) => {
6+
it.each(['imports', 'exports'])(`adds extension to %s`, async (name) => {
77
const filepath = path.resolve(
88
__dirname,
99
`../__fixtures__/project/code/$${name}-input.ts`

packages/react-native-builder-bob/src/babel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const isDirectory = (filename: string): boolean => {
2727
};
2828

2929
const isModule = (filename: string, ext: string): boolean => {
30-
const exts = ['.js', '.ts', '.jsx', '.tsx', ext];
30+
const exts = ['js', 'ts', 'jsx', 'tsx', ext];
3131

3232
// Metro won't resolve these extensions if explicit extension is provided
3333
// So we can't add extension to these files

0 commit comments

Comments
 (0)