Skip to content

Commit c1914d6

Browse files
authored
test(metro-config): add tests for default config (#3866)
1 parent b936112 commit c1914d6

File tree

11 files changed

+120
-0
lines changed

11 files changed

+120
-0
lines changed

.changeset/chatty-maps-teach.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@react-native/community-cli-plugin",
3+
"version": "1000.0.0",
4+
"description": "Core CLI commands for React Native",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/facebook/react-native.git",
9+
"directory": "packages/community-cli-plugin"
10+
},
11+
"exports": {
12+
".": "./index.js",
13+
"./package.json": "./package.json"
14+
}
15+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
exports.getDefaultConfig = () => ({
2+
resolver: {},
3+
serializer: {},
4+
transformer: {},
5+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@react-native/metro-config",
3+
"version": "1000.0.0",
4+
"description": "Metro configuration for React Native",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/facebook/react-native.git"
9+
},
10+
"exports": {
11+
".": "./index.js",
12+
"./package.json": "./package.json"
13+
}
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "metro",
3+
"version": "1000.0.0",
4+
"description": "🚇 The JavaScript bundler for React Native.",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "git@github.com:facebook/metro.git"
9+
},
10+
"exports": {
11+
".": "./index.js",
12+
"./package.json": "./package.json"
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export function registerAsset() {}
2+
export function getAssetByID() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "react-native-web",
3+
"version": "1000.0.0",
4+
"description": "React Native for Web",
5+
"license": "MIT",
6+
"repository": {
7+
"type": "git",
8+
"url": "git@github.com:necolas/react-native-web.git"
9+
}
10+
}

packages/metro-config/test/__fixtures__/awesome-repo/node_modules/react-native/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"repository": {
77
"type": "git",
88
"url": "git@github.com:facebook/react-native.git"
9+
},
10+
"dependencies": {
11+
"@react-native/community-cli-plugin": "1000.0.0"
912
}
1013
}

0 commit comments

Comments
 (0)