From 48e52e0d5510baba2f3749f82bc928b06b874c27 Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Wed, 17 Feb 2021 23:30:30 -0500 Subject: [PATCH] refactor: add comment to main generated index.js (#413) * add comment to main generated index.js * update test snapshots --- templates/general.js | 8 ++++++-- .../view/__snapshots__/cli-create-with-view.test.js.snap | 4 +++- .../__snapshots__/cli-create-with-defaults.test.js.snap | 4 +++- .../__snapshots__/create-view-with-defaults.test.js.snap | 2 ++ .../create-view-with-example-with-defaults.test.js.snap | 2 ++ .../create-view-with-example-with-options.test.js.snap | 2 ++ .../lib-view-android-config-options.test.js.snap | 2 ++ .../create-view-with-options-for-ios.test.js.snap | 2 ++ .../__snapshots__/create-with-defaults.test.js.snap | 2 ++ .../__snapshots__/bogus-platforms-name.test.js.snap | 2 ++ .../bogus-platforms-empty-array.test.js.snap | 2 ++ .../bogus-platforms-empty-string.test.js.snap | 2 ++ .../create-with-example-for-android-only.test.js.snap | 2 ++ .../create-with-example-with-defaults.test.js.snap | 2 ++ .../recover-from-missing-package-scripts.test.js.snap | 2 ++ .../create-with-example-with-null-prefix.test.js.snap | 2 ++ .../create-with-example-with-options.test.js.snap | 2 ++ .../create-with-name-in-camel-case.test.js.snap | 2 ++ .../create-with-options-for-android.test.js.snap | 2 ++ .../create-with-options-for-ios.test.js.snap | 2 ++ .../__snapshots__/platforms-array.test.js.snap | 2 ++ .../__snapshots__/platforms-comma-separated.test.js.snap | 2 ++ .../create-with-custom-module-prefix.test.js.snap | 2 ++ .../__snapshots__/create-with-module-name.test.js.snap | 2 ++ .../cli-command-with-bogus-platforms-name.test.js.snap | 4 +++- .../cli-command-with-empty-platforms-string.test.js.snap | 4 +++- .../cli-command-func-with-options.test.js.snap | 4 +++- .../cli-program-with-defaults-for-android.test.js.snap | 4 +++- .../cli-program-with-example-with-logging.test.js.snap | 4 +++- .../create-with-example-with-defaults.test.js.snap | 4 +++- .../__snapshots__/with-yarn-error-logging.test.js.snap | 4 +++- .../create-with-example-with-options.test.js.snap | 4 +++- .../create-with-example-with-options.test.js.snap | 4 +++- 33 files changed, 81 insertions(+), 13 deletions(-) diff --git a/templates/general.js b/templates/general.js index 871cddff..e64eb77b 100644 --- a/templates/general.js +++ b/templates/general.js @@ -79,7 +79,9 @@ ${objectClassName}; // for module without view: name: ({ view }) => !view && 'index.js', content: ({ objectClassName }) => - `import { NativeModules } from 'react-native'; + `// main index.js + +import { NativeModules } from 'react-native'; const { ${objectClassName} } = NativeModules; @@ -89,7 +91,9 @@ export default ${objectClassName}; // for module with view: name: ({ view }) => view && 'index.js', content: ({ objectClassName }) => - `import { requireNativeComponent } from 'react-native'; + `// main index.js + +import { requireNativeComponent } from 'react-native'; const ${objectClassName} = requireNativeComponent('${objectClassName}', null); diff --git a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap index 959e5d35..ada53499 100644 --- a/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap +++ b/tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap @@ -305,7 +305,9 @@ public class IntegrationViewTestPackagePackage implements ReactPackage { }, Object { "name": "react-native-integration-view-test-package/index.js", - "theContent": "import { requireNativeComponent } from 'react-native'; + "theContent": "// main index.js + +import { requireNativeComponent } from 'react-native'; const IntegrationViewTestPackage = requireNativeComponent('IntegrationViewTestPackage', null); diff --git a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap index 45aad780..1fac6af6 100644 --- a/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap +++ b/tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap @@ -306,7 +306,9 @@ public class IntegrationTestPackagePackage implements ReactPackage { }, Object { "name": "react-native-integration-test-package/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { IntegrationTestPackage } = NativeModules; diff --git a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap index 21e03644..5aa5e888 100644 --- a/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { requireNativeComponent } from 'react-native'; const AliceBobbi = requireNativeComponent('AliceBobbi', null); diff --git a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap index 1016decc..5071732e 100644 --- a/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap @@ -108,6 +108,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { requireNativeComponent } from 'react-native'; const AliceBobbi = requireNativeComponent('AliceBobbi', null); diff --git a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap index 70caf3e2..6e963e4a 100644 --- a/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap @@ -108,6 +108,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { requireNativeComponent } from 'react-native'; const AliceBobbi = requireNativeComponent('AliceBobbi', null); diff --git a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap index 89d8b2de..c3ca7881 100644 --- a/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap +++ b/tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap @@ -92,6 +92,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { requireNativeComponent } from 'react-native'; const AliceBobbi = requireNativeComponent('AliceBobbi', null); diff --git a/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap b/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap index a13fc724..671c4929 100644 --- a/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap +++ b/tests/with-injection/create/view/with-options/for-ios/__snapshots__/create-view-with-options-for-ios.test.js.snap @@ -93,6 +93,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { requireNativeComponent } from 'react-native'; const AliceBobbi = requireNativeComponent('AliceBobbi', null); diff --git a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap index 3ac692ab..b5200732 100644 --- a/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-defaults/bogus-platforms/bogus-name/__snapshots__/bogus-platforms-name.test.js.snap b/tests/with-injection/create/with-defaults/bogus-platforms/bogus-name/__snapshots__/bogus-platforms-name.test.js.snap index 6879cf40..1d45fd77 100644 --- a/tests/with-injection/create/with-defaults/bogus-platforms/bogus-name/__snapshots__/bogus-platforms-name.test.js.snap +++ b/tests/with-injection/create/with-defaults/bogus-platforms/bogus-name/__snapshots__/bogus-platforms-name.test.js.snap @@ -81,6 +81,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-defaults/bogus-platforms/empty-array/__snapshots__/bogus-platforms-empty-array.test.js.snap b/tests/with-injection/create/with-defaults/bogus-platforms/empty-array/__snapshots__/bogus-platforms-empty-array.test.js.snap index 2be4414b..7e1ca833 100644 --- a/tests/with-injection/create/with-defaults/bogus-platforms/empty-array/__snapshots__/bogus-platforms-empty-array.test.js.snap +++ b/tests/with-injection/create/with-defaults/bogus-platforms/empty-array/__snapshots__/bogus-platforms-empty-array.test.js.snap @@ -81,6 +81,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-defaults/bogus-platforms/empty-string/__snapshots__/bogus-platforms-empty-string.test.js.snap b/tests/with-injection/create/with-defaults/bogus-platforms/empty-string/__snapshots__/bogus-platforms-empty-string.test.js.snap index 70b1d08c..5c968fb9 100644 --- a/tests/with-injection/create/with-defaults/bogus-platforms/empty-string/__snapshots__/bogus-platforms-empty-string.test.js.snap +++ b/tests/with-injection/create/with-defaults/bogus-platforms/empty-string/__snapshots__/bogus-platforms-empty-string.test.js.snap @@ -81,6 +81,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap index a2b3b77f..7fee5d70 100644 --- a/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap +++ b/tests/with-injection/create/with-example/for-android-only/__snapshots__/create-with-example-for-android-only.test.js.snap @@ -96,6 +96,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index 3c143e66..12a179dc 100644 --- a/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -108,6 +108,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap index a896ea35..6d491095 100644 --- a/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap +++ b/tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap @@ -108,6 +108,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap index d59b1f19..508a6cde 100644 --- a/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap +++ b/tests/with-injection/create/with-example/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-null-prefix.test.js.snap @@ -108,6 +108,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap index c3a62003..d408e4e0 100644 --- a/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -108,6 +108,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { SuperAwesomeModule } = NativeModules; diff --git a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap index b194f92d..11459539 100644 --- a/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap +++ b/tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap index 2381e0d9..eb4d3127 100644 --- a/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap +++ b/tests/with-injection/create/with-options/for-android/__snapshots__/create-with-options-for-android.test.js.snap @@ -92,6 +92,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap b/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap index 11894628..b061aa60 100644 --- a/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap +++ b/tests/with-injection/create/with-options/for-ios/__snapshots__/create-with-options-for-ios.test.js.snap @@ -93,6 +93,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap index 894a7fe4..b15f1e45 100644 --- a/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { ABCAliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap index 82c1d557..1fa0fe41 100644 --- a/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap +++ b/tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: react-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap index 44b4f49d..d29efc3f 100644 --- a/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap +++ b/tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: custom-native-alice-bobbi/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap index e7bde4ed..07885f33 100644 --- a/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap +++ b/tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap @@ -104,6 +104,8 @@ content: "* outputFile name: custom-native-module/index.js content: -------- +// main index.js + import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap b/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap index 736d6613..55421230 100644 --- a/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap +++ b/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/bogus-name/__snapshots__/cli-command-with-bogus-platforms-name.test.js.snap @@ -114,7 +114,9 @@ AliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap b/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap index 348df1db..3425e251 100644 --- a/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap +++ b/tests/with-mocks/cli/command/action-func/with-logging/with-bogus-platforms/empty-string/__snapshots__/cli-command-with-empty-platforms-string.test.js.snap @@ -114,7 +114,9 @@ AliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap index 1b39737a..c817df60 100644 --- a/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap +++ b/tests/with-mocks/cli/command/action-func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap @@ -114,7 +114,9 @@ AliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap index bf00ba6e..6aed6e46 100644 --- a/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap +++ b/tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap @@ -311,7 +311,9 @@ TestPackage; }, Object { "outputFileName": "react-native-test-package/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { TestPackage } = NativeModules; diff --git a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap index cc53186b..e42d4514 100644 --- a/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap +++ b/tests/with-mocks/cli/program/with-example/with-logging/__snapshots__/cli-program-with-example-with-logging.test.js.snap @@ -399,7 +399,9 @@ TestPackage; }, Object { "outputFileName": "react-native-test-package/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { TestPackage } = NativeModules; diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap index f9aeb2cc..7ed42c65 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap @@ -185,7 +185,9 @@ AliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap index 8b45f05a..df6e7244 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap @@ -185,7 +185,9 @@ AliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap index 3150f8af..eb636955 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap @@ -185,7 +185,9 @@ AliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { AliceBobbi } = NativeModules; diff --git a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap index 9a796ca6..d6c773e3 100644 --- a/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap +++ b/tests/with-mocks/lib/create/with-example/with-logging/with-options/__snapshots__/create-with-example-with-options.test.js.snap @@ -179,7 +179,9 @@ ABCAliceBobbi; }, Object { "outputFileName": "react-native-alice-bobbi/index.js", - "theContent": "import { NativeModules } from 'react-native'; + "theContent": "// main index.js + +import { NativeModules } from 'react-native'; const { ABCAliceBobbi } = NativeModules;