@modern-js/module-tools-docs 2.2.1-beta.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/docs/en/api/plugin-api/plugin-hooks.md +2 -10
  2. package/docs/en/guide/advance/in-depth-about-dev-command.md +0 -9
  3. package/docs/en/guide/basic/command-preview.md +1 -1
  4. package/docs/en/guide/basic/using-storybook.mdx +28 -6
  5. package/docs/en/guide/intro/getting-started.md +1 -1
  6. package/docs/en/index.md +14 -8
  7. package/docs/en/plugins/guide/getting-started.mdx +1 -1
  8. package/docs/zh/api/plugin-api/plugin-hooks.md +2 -10
  9. package/docs/zh/guide/advance/in-depth-about-dev-command.md +0 -8
  10. package/docs/zh/guide/basic/command-preview.md +1 -1
  11. package/docs/zh/guide/basic/using-storybook.mdx +28 -5
  12. package/docs/zh/index.md +16 -10
  13. package/docs/zh/plugins/guide/getting-started.mdx +1 -1
  14. package/modern.config.ts +4 -6
  15. package/package.json +4 -4
  16. package/doc_build/html/main/index.html +0 -16
  17. package/doc_build/route.json +0 -10
  18. package/doc_build/static/css/main.css +0 -2977
  19. package/doc_build/static/css/main.css.map +0 -1
  20. package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css +0 -68
  21. package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css.map +0 -1
  22. package/doc_build/static/js/async/en_api_config_build-config.js +0 -8406
  23. package/doc_build/static/js/async/en_api_config_build-config.js.map +0 -1
  24. package/doc_build/static/js/async/en_api_config_build-preset.js +0 -7865
  25. package/doc_build/static/js/async/en_api_config_build-preset.js.map +0 -1
  26. package/doc_build/static/js/async/en_api_config_design-system.js +0 -47805
  27. package/doc_build/static/js/async/en_api_config_design-system.js.map +0 -1
  28. package/doc_build/static/js/async/en_api_config_plugins.js +0 -1488
  29. package/doc_build/static/js/async/en_api_config_plugins.js.map +0 -1
  30. package/doc_build/static/js/async/en_api_config_testing.js +0 -2139
  31. package/doc_build/static/js/async/en_api_config_testing.js.map +0 -1
  32. package/doc_build/static/js/async/en_api_index.js +0 -51
  33. package/doc_build/static/js/async/en_api_index.js.map +0 -1
  34. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +0 -14360
  35. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +0 -1
  36. package/doc_build/static/js/async/en_guide_advance_asset.js +0 -3972
  37. package/doc_build/static/js/async/en_guide_advance_asset.js.map +0 -1
  38. package/doc_build/static/js/async/en_guide_advance_build-umd.js +0 -9857
  39. package/doc_build/static/js/async/en_guide_advance_build-umd.js.map +0 -1
  40. package/doc_build/static/js/async/en_guide_advance_copy.js +0 -6541
  41. package/doc_build/static/js/async/en_guide_advance_copy.js.map +0 -1
  42. package/doc_build/static/js/async/en_guide_advance_external-dependency.js +0 -3806
  43. package/doc_build/static/js/async/en_guide_advance_external-dependency.js.map +0 -1
  44. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +0 -5304
  45. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +0 -1
  46. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +0 -2526
  47. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +0 -1
  48. package/doc_build/static/js/async/en_guide_advance_theme-config.js +0 -2486
  49. package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +0 -1
  50. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +0 -3720
  51. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +0 -1
  52. package/doc_build/static/js/async/en_guide_basic_command-preview.js +0 -3973
  53. package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +0 -1
  54. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +0 -3137
  55. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +0 -1
  56. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +0 -2180
  57. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +0 -1
  58. package/doc_build/static/js/async/en_guide_basic_test-your-project.js +0 -3887
  59. package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +0 -1
  60. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +0 -2973
  61. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +0 -1
  62. package/doc_build/static/js/async/en_guide_basic_using-storybook.js +0 -4723
  63. package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +0 -1
  64. package/doc_build/static/js/async/en_guide_best-practices_components.js +0 -21400
  65. package/doc_build/static/js/async/en_guide_best-practices_components.js.map +0 -1
  66. package/doc_build/static/js/async/en_guide_intro_getting-started.js +0 -2149
  67. package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +0 -1
  68. package/doc_build/static/js/async/en_guide_intro_welcome.js +0 -162
  69. package/doc_build/static/js/async/en_guide_intro_welcome.js.map +0 -1
  70. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +0 -96
  71. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +0 -1
  72. package/doc_build/static/js/async/en_index.js +0 -81
  73. package/doc_build/static/js/async/en_index.js.map +0 -1
  74. package/doc_build/static/js/async/en_plugins_guide_getting-started.js +0 -2556
  75. package/doc_build/static/js/async/en_plugins_guide_getting-started.js.map +0 -1
  76. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +0 -4173
  77. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js.map +0 -1
  78. package/doc_build/static/js/async/en_plugins_guide_setup-function.js +0 -3815
  79. package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +0 -1
  80. package/doc_build/static/js/async/en_plugins_official-list_overview.js +0 -66
  81. package/doc_build/static/js/async/en_plugins_official-list_overview.js.map +0 -1
  82. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +0 -246
  83. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +0 -1
  84. package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js +0 -6656
  85. package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js.map +0 -1
  86. package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js +0 -54
  87. package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js.map +0 -1
  88. package/doc_build/static/js/async/zh_api_config_build-config.js +0 -11354
  89. package/doc_build/static/js/async/zh_api_config_build-config.js.map +0 -1
  90. package/doc_build/static/js/async/zh_api_config_build-preset.js +0 -7867
  91. package/doc_build/static/js/async/zh_api_config_build-preset.js.map +0 -1
  92. package/doc_build/static/js/async/zh_api_config_design-system.js +0 -48712
  93. package/doc_build/static/js/async/zh_api_config_design-system.js.map +0 -1
  94. package/doc_build/static/js/async/zh_api_config_plugins.js +0 -1488
  95. package/doc_build/static/js/async/zh_api_config_plugins.js.map +0 -1
  96. package/doc_build/static/js/async/zh_api_config_testing.js +0 -2132
  97. package/doc_build/static/js/async/zh_api_config_testing.js.map +0 -1
  98. package/doc_build/static/js/async/zh_api_index.js +0 -52
  99. package/doc_build/static/js/async/zh_api_index.js.map +0 -1
  100. package/doc_build/static/js/async/zh_api_plugin-api_plugin-hooks.js +0 -14392
  101. package/doc_build/static/js/async/zh_api_plugin-api_plugin-hooks.js.map +0 -1
  102. package/doc_build/static/js/async/zh_guide_advance_asset.js +0 -3972
  103. package/doc_build/static/js/async/zh_guide_advance_asset.js.map +0 -1
  104. package/doc_build/static/js/async/zh_guide_advance_build-umd.js +0 -9859
  105. package/doc_build/static/js/async/zh_guide_advance_build-umd.js.map +0 -1
  106. package/doc_build/static/js/async/zh_guide_advance_copy.js +0 -6541
  107. package/doc_build/static/js/async/zh_guide_advance_copy.js.map +0 -1
  108. package/doc_build/static/js/async/zh_guide_advance_external-dependency.js +0 -3808
  109. package/doc_build/static/js/async/zh_guide_advance_external-dependency.js.map +0 -1
  110. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-build.js +0 -5304
  111. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-build.js.map +0 -1
  112. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.js +0 -2526
  113. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.js.map +0 -1
  114. package/doc_build/static/js/async/zh_guide_advance_theme-config.js +0 -2477
  115. package/doc_build/static/js/async/zh_guide_advance_theme-config.js.map +0 -1
  116. package/doc_build/static/js/async/zh_guide_basic_before-getting-started.js +0 -3711
  117. package/doc_build/static/js/async/zh_guide_basic_before-getting-started.js.map +0 -1
  118. package/doc_build/static/js/async/zh_guide_basic_command-preview.js +0 -3805
  119. package/doc_build/static/js/async/zh_guide_basic_command-preview.js.map +0 -1
  120. package/doc_build/static/js/async/zh_guide_basic_modify-output-product.js +0 -3142
  121. package/doc_build/static/js/async/zh_guide_basic_modify-output-product.js.map +0 -1
  122. package/doc_build/static/js/async/zh_guide_basic_publish-your-project.js +0 -2241
  123. package/doc_build/static/js/async/zh_guide_basic_publish-your-project.js.map +0 -1
  124. package/doc_build/static/js/async/zh_guide_basic_test-your-project.js +0 -4286
  125. package/doc_build/static/js/async/zh_guide_basic_test-your-project.js.map +0 -1
  126. package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.js +0 -2979
  127. package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.js.map +0 -1
  128. package/doc_build/static/js/async/zh_guide_basic_using-storybook.js +0 -4760
  129. package/doc_build/static/js/async/zh_guide_basic_using-storybook.js.map +0 -1
  130. package/doc_build/static/js/async/zh_guide_best-practices_components.js +0 -21100
  131. package/doc_build/static/js/async/zh_guide_best-practices_components.js.map +0 -1
  132. package/doc_build/static/js/async/zh_guide_intro_getting-started.js +0 -2031
  133. package/doc_build/static/js/async/zh_guide_intro_getting-started.js.map +0 -1
  134. package/doc_build/static/js/async/zh_guide_intro_welcome.js +0 -162
  135. package/doc_build/static/js/async/zh_guide_intro_welcome.js.map +0 -1
  136. package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.js +0 -96
  137. package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.js.map +0 -1
  138. package/doc_build/static/js/async/zh_index.js +0 -81
  139. package/doc_build/static/js/async/zh_index.js.map +0 -1
  140. package/doc_build/static/js/async/zh_plugins_guide_getting-started.js +0 -2604
  141. package/doc_build/static/js/async/zh_plugins_guide_getting-started.js.map +0 -1
  142. package/doc_build/static/js/async/zh_plugins_guide_plugin-object.js +0 -4169
  143. package/doc_build/static/js/async/zh_plugins_guide_plugin-object.js.map +0 -1
  144. package/doc_build/static/js/async/zh_plugins_guide_setup-function.js +0 -3815
  145. package/doc_build/static/js/async/zh_plugins_guide_setup-function.js.map +0 -1
  146. package/doc_build/static/js/async/zh_plugins_official-list_overview.js +0 -66
  147. package/doc_build/static/js/async/zh_plugins_official-list_overview.js.map +0 -1
  148. package/doc_build/static/js/builder-runtime.js +0 -1375
  149. package/doc_build/static/js/builder-runtime.js.map +0 -1
  150. package/doc_build/static/js/lib-lodash.js +0 -4907
  151. package/doc_build/static/js/lib-lodash.js.map +0 -1
  152. package/doc_build/static/js/lib-polyfill.js +0 -11847
  153. package/doc_build/static/js/lib-polyfill.js.map +0 -1
  154. package/doc_build/static/js/lib-react.js +0 -39510
  155. package/doc_build/static/js/lib-react.js.map +0 -1
  156. package/doc_build/static/js/main.js +0 -8610
  157. package/doc_build/static/js/main.js.map +0 -1
  158. package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js +0 -7328
  159. package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js.map +0 -1
  160. package/doc_build/static/search_index.json +0 -1
@@ -1,4286 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_guide_basic_test-your-project"],{
3
-
4
- /***/ "./docs/zh/guide/basic/test-your-project.mdx":
5
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
-
7
- __webpack_require__.r(__webpack_exports__);
8
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
- /* harmony export */ "CH": function() { return /* binding */ CH; },
10
- /* harmony export */ "chCodeConfig": function() { return /* binding */ chCodeConfig; },
11
- /* harmony export */ "content": function() { return /* binding */ content; },
12
- /* harmony export */ "frontmatter": function() { return /* binding */ frontmatter; },
13
- /* harmony export */ "title": function() { return /* binding */ title; },
14
- /* harmony export */ "toc": function() { return /* binding */ toc; }
15
- /* harmony export */ });
16
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");
17
- /* harmony import */ var _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@code-hike+mdx@0.7.4_react@18.2.0/node_modules/@code-hike/mdx/dist/components.esm.mjs");
18
- /*@jsxRuntime automatic @jsxImportSource react*/
19
- /*链接待补充*/
20
-
21
-
22
- const CH = {
23
- annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
24
- Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code,
25
- Spotlight: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Spotlight,
26
- CodeSlot: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.CodeSlot
27
- };
28
- const chCodeConfig = {
29
- "staticMediaQuery": "not screen, (max-width: 768px)",
30
- "theme": {
31
- "name": "nord",
32
- "type": "dark",
33
- "semanticHighlighting": true,
34
- "colors": {
35
- "focusBorder": "#3b4252",
36
- "foreground": "#d8dee9",
37
- "activityBar.background": "#2e3440",
38
- "activityBar.dropBackground": "#3b4252",
39
- "activityBar.foreground": "#d8dee9",
40
- "activityBar.activeBorder": "#88c0d0",
41
- "activityBar.activeBackground": "#3b4252",
42
- "activityBarBadge.background": "#88c0d0",
43
- "activityBarBadge.foreground": "#2e3440",
44
- "badge.foreground": "#2e3440",
45
- "badge.background": "#88c0d0",
46
- "button.background": "#88c0d0ee",
47
- "button.foreground": "#2e3440",
48
- "button.hoverBackground": "#88c0d0",
49
- "button.secondaryBackground": "#434c5e",
50
- "button.secondaryForeground": "#d8dee9",
51
- "button.secondaryHoverBackground": "#4c566a",
52
- "charts.red": "#bf616a",
53
- "charts.blue": "#81a1c1",
54
- "charts.yellow": "#ebcb8b",
55
- "charts.orange": "#d08770",
56
- "charts.green": "#a3be8c",
57
- "charts.purple": "#b48ead",
58
- "charts.foreground": "#d8dee9",
59
- "charts.lines": "#88c0d0",
60
- "debugConsole.infoForeground": "#88c0d0",
61
- "debugConsole.warningForeground": "#ebcb8b",
62
- "debugConsole.errorForeground": "#bf616a",
63
- "debugConsole.sourceForeground": "#616e88",
64
- "debugConsoleInputIcon.foreground": "#81a1c1",
65
- "debugExceptionWidget.background": "#4c566a",
66
- "debugExceptionWidget.border": "#2e3440",
67
- "debugToolBar.background": "#3b4252",
68
- "descriptionForeground": "#d8dee9e6",
69
- "diffEditor.insertedTextBackground": "#81a1c133",
70
- "diffEditor.removedTextBackground": "#bf616a4d",
71
- "dropdown.background": "#3b4252",
72
- "dropdown.border": "#3b4252",
73
- "dropdown.foreground": "#d8dee9",
74
- "editorActiveLineNumber.foreground": "#d8dee9cc",
75
- "editorCursor.foreground": "#d8dee9",
76
- "editorHint.border": "#ebcb8b00",
77
- "editorHint.foreground": "#ebcb8b",
78
- "editorIndentGuide.background": "#434c5eb3",
79
- "editorIndentGuide.activeBackground": "#4c566a",
80
- "editorInlayHint.background": "#434c5e",
81
- "editorInlayHint.foreground": "#d8dee9",
82
- "editorLineNumber.foreground": "#4c566a",
83
- "editorLineNumber.activeForeground": "#d8dee9",
84
- "editorWhitespace.foreground": "#4c566ab3",
85
- "editorWidget.background": "#2e3440",
86
- "editorWidget.border": "#3b4252",
87
- "editor.background": "#2e3440",
88
- "editor.foreground": "#d8dee9",
89
- "editor.hoverHighlightBackground": "#3b4252",
90
- "editor.findMatchBackground": "#88c0d066",
91
- "editor.findMatchHighlightBackground": "#88c0d033",
92
- "editor.findRangeHighlightBackground": "#88c0d033",
93
- "editor.lineHighlightBackground": "#3b4252",
94
- "editor.lineHighlightBorder": "#3b4252",
95
- "editor.inactiveSelectionBackground": "#434c5ecc",
96
- "editor.inlineValuesBackground": "#4c566a",
97
- "editor.inlineValuesForeground": "#eceff4",
98
- "editor.selectionBackground": "#434c5ecc",
99
- "editor.selectionHighlightBackground": "#434c5ecc",
100
- "editor.rangeHighlightBackground": "#434c5e52",
101
- "editor.wordHighlightBackground": "#81a1c166",
102
- "editor.wordHighlightStrongBackground": "#81a1c199",
103
- "editor.stackFrameHighlightBackground": "#5e81ac",
104
- "editor.focusedStackFrameHighlightBackground": "#5e81ac",
105
- "editorError.foreground": "#bf616a",
106
- "editorError.border": "#bf616a00",
107
- "editorWarning.foreground": "#ebcb8b",
108
- "editorWarning.border": "#ebcb8b00",
109
- "editorBracketMatch.background": "#2e344000",
110
- "editorBracketMatch.border": "#88c0d0",
111
- "editorBracketHighlight.foreground1": "#8fbcbb",
112
- "editorBracketHighlight.foreground2": "#88c0d0",
113
- "editorBracketHighlight.foreground3": "#81a1c1",
114
- "editorBracketHighlight.foreground4": "#5e81ac",
115
- "editorBracketHighlight.foreground5": "#8fbcbb",
116
- "editorBracketHighlight.foreground6": "#88c0d0",
117
- "editorBracketHighlight.unexpectedBracket.foreground": "#bf616a",
118
- "editorCodeLens.foreground": "#4c566a",
119
- "editorGroup.background": "#2e3440",
120
- "editorGroup.border": "#3b425201",
121
- "editorGroup.dropBackground": "#3b425299",
122
- "editorGroupHeader.border": "#3b425200",
123
- "editorGroupHeader.noTabsBackground": "#2e3440",
124
- "editorGroupHeader.tabsBackground": "#2e3440",
125
- "editorGroupHeader.tabsBorder": "#3b425200",
126
- "editorGutter.background": "#2e3440",
127
- "editorGutter.modifiedBackground": "#ebcb8b",
128
- "editorGutter.addedBackground": "#a3be8c",
129
- "editorGutter.deletedBackground": "#bf616a",
130
- "editorHoverWidget.background": "#3b4252",
131
- "editorHoverWidget.border": "#3b4252",
132
- "editorLink.activeForeground": "#88c0d0",
133
- "editorMarkerNavigation.background": "#5e81acc0",
134
- "editorMarkerNavigationError.background": "#bf616ac0",
135
- "editorMarkerNavigationWarning.background": "#ebcb8bc0",
136
- "editorOverviewRuler.border": "#3b4252",
137
- "editorOverviewRuler.currentContentForeground": "#3b4252",
138
- "editorOverviewRuler.incomingContentForeground": "#3b4252",
139
- "editorOverviewRuler.findMatchForeground": "#88c0d066",
140
- "editorOverviewRuler.rangeHighlightForeground": "#88c0d066",
141
- "editorOverviewRuler.selectionHighlightForeground": "#88c0d066",
142
- "editorOverviewRuler.wordHighlightForeground": "#88c0d066",
143
- "editorOverviewRuler.wordHighlightStrongForeground": "#88c0d066",
144
- "editorOverviewRuler.modifiedForeground": "#ebcb8b",
145
- "editorOverviewRuler.addedForeground": "#a3be8c",
146
- "editorOverviewRuler.deletedForeground": "#bf616a",
147
- "editorOverviewRuler.errorForeground": "#bf616a",
148
- "editorOverviewRuler.warningForeground": "#ebcb8b",
149
- "editorOverviewRuler.infoForeground": "#81a1c1",
150
- "editorRuler.foreground": "#434c5e",
151
- "editorSuggestWidget.background": "#2e3440",
152
- "editorSuggestWidget.border": "#3b4252",
153
- "editorSuggestWidget.foreground": "#d8dee9",
154
- "editorSuggestWidget.focusHighlightForeground": "#88c0d0",
155
- "editorSuggestWidget.highlightForeground": "#88c0d0",
156
- "editorSuggestWidget.selectedBackground": "#434c5e",
157
- "editorSuggestWidget.selectedForeground": "#d8dee9",
158
- "extensionButton.prominentForeground": "#d8dee9",
159
- "extensionButton.prominentBackground": "#434c5e",
160
- "extensionButton.prominentHoverBackground": "#4c566a",
161
- "errorForeground": "#bf616a",
162
- "gitDecoration.modifiedResourceForeground": "#ebcb8b",
163
- "gitDecoration.deletedResourceForeground": "#bf616a",
164
- "gitDecoration.untrackedResourceForeground": "#a3be8c",
165
- "gitDecoration.ignoredResourceForeground": "#d8dee966",
166
- "gitDecoration.conflictingResourceForeground": "#5e81ac",
167
- "gitDecoration.submoduleResourceForeground": "#8fbcbb",
168
- "gitDecoration.stageDeletedResourceForeground": "#bf616a",
169
- "gitDecoration.stageModifiedResourceForeground": "#ebcb8b",
170
- "input.background": "#3b4252",
171
- "input.foreground": "#d8dee9",
172
- "input.placeholderForeground": "#d8dee999",
173
- "input.border": "#3b4252",
174
- "inputOption.activeBackground": "#5e81ac",
175
- "inputOption.activeBorder": "#5e81ac",
176
- "inputOption.activeForeground": "#eceff4",
177
- "inputValidation.errorBackground": "#bf616a",
178
- "inputValidation.errorBorder": "#bf616a",
179
- "inputValidation.infoBackground": "#81a1c1",
180
- "inputValidation.infoBorder": "#81a1c1",
181
- "inputValidation.warningBackground": "#d08770",
182
- "inputValidation.warningBorder": "#d08770",
183
- "keybindingLabel.background": "#4c566a",
184
- "keybindingLabel.border": "#4c566a",
185
- "keybindingLabel.bottomBorder": "#4c566a",
186
- "keybindingLabel.foreground": "#d8dee9",
187
- "list.activeSelectionBackground": "#88c0d0",
188
- "list.activeSelectionForeground": "#2e3440",
189
- "list.inactiveSelectionBackground": "#434c5e",
190
- "list.inactiveSelectionForeground": "#d8dee9",
191
- "list.inactiveFocusBackground": "#434c5ecc",
192
- "list.hoverForeground": "#eceff4",
193
- "list.focusForeground": "#d8dee9",
194
- "list.focusBackground": "#88c0d099",
195
- "list.focusHighlightForeground": "#eceff4",
196
- "list.hoverBackground": "#3b4252",
197
- "list.dropBackground": "#88c0d099",
198
- "list.highlightForeground": "#88c0d0",
199
- "list.errorForeground": "#bf616a",
200
- "list.warningForeground": "#ebcb8b",
201
- "merge.currentHeaderBackground": "#81a1c166",
202
- "merge.currentContentBackground": "#81a1c14d",
203
- "merge.incomingHeaderBackground": "#8fbcbb66",
204
- "merge.incomingContentBackground": "#8fbcbb4d",
205
- "merge.border": "#3b425200",
206
- "minimap.background": "#2e3440",
207
- "minimap.errorHighlight": "#bf616acc",
208
- "minimap.findMatchHighlight": "#88c0d0",
209
- "minimap.selectionHighlight": "#88c0d0cc",
210
- "minimap.warningHighlight": "#ebcb8bcc",
211
- "minimapGutter.addedBackground": "#a3be8c",
212
- "minimapGutter.deletedBackground": "#bf616a",
213
- "minimapGutter.modifiedBackground": "#ebcb8b",
214
- "minimapSlider.activeBackground": "#434c5eaa",
215
- "minimapSlider.background": "#434c5e99",
216
- "minimapSlider.hoverBackground": "#434c5eaa",
217
- "notification.background": "#3b4252",
218
- "notification.buttonBackground": "#434c5e",
219
- "notification.buttonForeground": "#d8dee9",
220
- "notification.buttonHoverBackground": "#4c566a",
221
- "notification.errorBackground": "#bf616a",
222
- "notification.errorForeground": "#2e3440",
223
- "notification.foreground": "#d8dee9",
224
- "notification.infoBackground": "#88c0d0",
225
- "notification.infoForeground": "#2e3440",
226
- "notification.warningBackground": "#ebcb8b",
227
- "notification.warningForeground": "#2e3440",
228
- "notificationCenter.border": "#3b425200",
229
- "notificationCenterHeader.background": "#2e3440",
230
- "notificationCenterHeader.foreground": "#88c0d0",
231
- "notificationLink.foreground": "#88c0d0",
232
- "notifications.background": "#3b4252",
233
- "notifications.border": "#2e3440",
234
- "notifications.foreground": "#d8dee9",
235
- "notificationToast.border": "#3b425200",
236
- "panel.background": "#2e3440",
237
- "panel.border": "#3b4252",
238
- "panelTitle.activeBorder": "#88c0d000",
239
- "panelTitle.activeForeground": "#88c0d0",
240
- "panelTitle.inactiveForeground": "#d8dee9",
241
- "peekView.border": "#4c566a",
242
- "peekViewEditor.background": "#2e3440",
243
- "peekViewEditorGutter.background": "#2e3440",
244
- "peekViewEditor.matchHighlightBackground": "#88c0d04d",
245
- "peekViewResult.background": "#2e3440",
246
- "peekViewResult.fileForeground": "#88c0d0",
247
- "peekViewResult.lineForeground": "#d8dee966",
248
- "peekViewResult.matchHighlightBackground": "#88c0d0cc",
249
- "peekViewResult.selectionBackground": "#434c5e",
250
- "peekViewResult.selectionForeground": "#d8dee9",
251
- "peekViewTitle.background": "#3b4252",
252
- "peekViewTitleDescription.foreground": "#d8dee9",
253
- "peekViewTitleLabel.foreground": "#88c0d0",
254
- "pickerGroup.border": "#3b4252",
255
- "pickerGroup.foreground": "#88c0d0",
256
- "progressBar.background": "#88c0d0",
257
- "quickInputList.focusBackground": "#88c0d0",
258
- "quickInputList.focusForeground": "#2e3440",
259
- "sash.hoverBorder": "#88c0d0",
260
- "scrollbar.shadow": "#00000066",
261
- "scrollbarSlider.activeBackground": "#434c5eaa",
262
- "scrollbarSlider.background": "#434c5e99",
263
- "scrollbarSlider.hoverBackground": "#434c5eaa",
264
- "selection.background": "#88c0d099",
265
- "sideBar.background": "#2e3440",
266
- "sideBar.foreground": "#d8dee9",
267
- "sideBar.border": "#3b4252",
268
- "sideBarSectionHeader.background": "#3b4252",
269
- "sideBarSectionHeader.foreground": "#d8dee9",
270
- "sideBarTitle.foreground": "#d8dee9",
271
- "statusBar.background": "#3b4252",
272
- "statusBar.debuggingBackground": "#5e81ac",
273
- "statusBar.debuggingForeground": "#d8dee9",
274
- "statusBar.noFolderForeground": "#d8dee9",
275
- "statusBar.noFolderBackground": "#3b4252",
276
- "statusBar.foreground": "#d8dee9",
277
- "statusBarItem.activeBackground": "#4c566a",
278
- "statusBarItem.hoverBackground": "#434c5e",
279
- "statusBarItem.prominentBackground": "#3b4252",
280
- "statusBarItem.prominentHoverBackground": "#434c5e",
281
- "statusBarItem.errorBackground": "#3b4252",
282
- "statusBarItem.errorForeground": "#bf616a",
283
- "statusBarItem.warningBackground": "#ebcb8b",
284
- "statusBarItem.warningForeground": "#2e3440",
285
- "statusBar.border": "#3b425200",
286
- "tab.activeBackground": "#3b4252",
287
- "tab.activeForeground": "#d8dee9",
288
- "tab.border": "#3b425200",
289
- "tab.activeBorder": "#88c0d000",
290
- "tab.unfocusedActiveBorder": "#88c0d000",
291
- "tab.inactiveBackground": "#2e3440",
292
- "tab.inactiveForeground": "#d8dee966",
293
- "tab.unfocusedActiveForeground": "#d8dee999",
294
- "tab.unfocusedInactiveForeground": "#d8dee966",
295
- "tab.hoverBackground": "#3b4252cc",
296
- "tab.unfocusedHoverBackground": "#3b4252b3",
297
- "tab.hoverBorder": "#88c0d000",
298
- "tab.unfocusedHoverBorder": "#88c0d000",
299
- "tab.activeBorderTop": "#88c0d000",
300
- "tab.unfocusedActiveBorderTop": "#88c0d000",
301
- "tab.lastPinnedBorder": "#4c566a",
302
- "terminal.background": "#2e3440",
303
- "terminal.foreground": "#d8dee9",
304
- "terminal.ansiBlack": "#3b4252",
305
- "terminal.ansiRed": "#bf616a",
306
- "terminal.ansiGreen": "#a3be8c",
307
- "terminal.ansiYellow": "#ebcb8b",
308
- "terminal.ansiBlue": "#81a1c1",
309
- "terminal.ansiMagenta": "#b48ead",
310
- "terminal.ansiCyan": "#88c0d0",
311
- "terminal.ansiWhite": "#e5e9f0",
312
- "terminal.ansiBrightBlack": "#4c566a",
313
- "terminal.ansiBrightRed": "#bf616a",
314
- "terminal.ansiBrightGreen": "#a3be8c",
315
- "terminal.ansiBrightYellow": "#ebcb8b",
316
- "terminal.ansiBrightBlue": "#81a1c1",
317
- "terminal.ansiBrightMagenta": "#b48ead",
318
- "terminal.ansiBrightCyan": "#8fbcbb",
319
- "terminal.ansiBrightWhite": "#eceff4",
320
- "terminal.tab.activeBorder": "#88c0d0",
321
- "textBlockQuote.background": "#3b4252",
322
- "textBlockQuote.border": "#81a1c1",
323
- "textCodeBlock.background": "#4c566a",
324
- "textLink.activeForeground": "#88c0d0",
325
- "textLink.foreground": "#88c0d0",
326
- "textPreformat.foreground": "#8fbcbb",
327
- "textSeparator.foreground": "#eceff4",
328
- "titleBar.activeBackground": "#2e3440",
329
- "titleBar.activeForeground": "#d8dee9",
330
- "titleBar.border": "#2e344000",
331
- "titleBar.inactiveBackground": "#2e3440",
332
- "titleBar.inactiveForeground": "#d8dee966",
333
- "tree.indentGuidesStroke": "#616e88",
334
- "walkThrough.embeddedEditorBackground": "#2e3440",
335
- "welcomePage.buttonBackground": "#434c5e",
336
- "welcomePage.buttonHoverBackground": "#4c566a",
337
- "widget.shadow": "#00000066"
338
- },
339
- "tokenColors": [{
340
- "settings": {
341
- "foreground": "#d8dee9ff",
342
- "background": "#2e3440ff"
343
- }
344
- }, {
345
- "scope": "emphasis",
346
- "settings": {
347
- "fontStyle": "italic"
348
- }
349
- }, {
350
- "scope": "strong",
351
- "settings": {
352
- "fontStyle": "bold"
353
- }
354
- }, {
355
- "name": "Comment",
356
- "scope": "comment",
357
- "settings": {
358
- "foreground": "#616E88"
359
- }
360
- }, {
361
- "name": "Constant Character",
362
- "scope": "constant.character",
363
- "settings": {
364
- "foreground": "#EBCB8B"
365
- }
366
- }, {
367
- "name": "Constant Character Escape",
368
- "scope": "constant.character.escape",
369
- "settings": {
370
- "foreground": "#EBCB8B"
371
- }
372
- }, {
373
- "name": "Constant Language",
374
- "scope": "constant.language",
375
- "settings": {
376
- "foreground": "#81A1C1"
377
- }
378
- }, {
379
- "name": "Constant Numeric",
380
- "scope": "constant.numeric",
381
- "settings": {
382
- "foreground": "#B48EAD"
383
- }
384
- }, {
385
- "name": "Constant Regexp",
386
- "scope": "constant.regexp",
387
- "settings": {
388
- "foreground": "#EBCB8B"
389
- }
390
- }, {
391
- "name": "Entity Name Class/Type",
392
- "scope": ["entity.name.class", "entity.name.type.class"],
393
- "settings": {
394
- "foreground": "#8FBCBB"
395
- }
396
- }, {
397
- "name": "Entity Name Function",
398
- "scope": "entity.name.function",
399
- "settings": {
400
- "foreground": "#88C0D0"
401
- }
402
- }, {
403
- "name": "Entity Name Tag",
404
- "scope": "entity.name.tag",
405
- "settings": {
406
- "foreground": "#81A1C1"
407
- }
408
- }, {
409
- "name": "Entity Other Attribute Name",
410
- "scope": "entity.other.attribute-name",
411
- "settings": {
412
- "foreground": "#8FBCBB"
413
- }
414
- }, {
415
- "name": "Entity Other Inherited Class",
416
- "scope": "entity.other.inherited-class",
417
- "settings": {
418
- "fontStyle": "bold",
419
- "foreground": "#8FBCBB"
420
- }
421
- }, {
422
- "name": "Invalid Deprecated",
423
- "scope": "invalid.deprecated",
424
- "settings": {
425
- "foreground": "#D8DEE9",
426
- "background": "#EBCB8B"
427
- }
428
- }, {
429
- "name": "Invalid Illegal",
430
- "scope": "invalid.illegal",
431
- "settings": {
432
- "foreground": "#D8DEE9",
433
- "background": "#BF616A"
434
- }
435
- }, {
436
- "name": "Keyword",
437
- "scope": "keyword",
438
- "settings": {
439
- "foreground": "#81A1C1"
440
- }
441
- }, {
442
- "name": "Keyword Operator",
443
- "scope": "keyword.operator",
444
- "settings": {
445
- "foreground": "#81A1C1"
446
- }
447
- }, {
448
- "name": "Keyword Other New",
449
- "scope": "keyword.other.new",
450
- "settings": {
451
- "foreground": "#81A1C1"
452
- }
453
- }, {
454
- "name": "Markup Bold",
455
- "scope": "markup.bold",
456
- "settings": {
457
- "fontStyle": "bold"
458
- }
459
- }, {
460
- "name": "Markup Changed",
461
- "scope": "markup.changed",
462
- "settings": {
463
- "foreground": "#EBCB8B"
464
- }
465
- }, {
466
- "name": "Markup Deleted",
467
- "scope": "markup.deleted",
468
- "settings": {
469
- "foreground": "#BF616A"
470
- }
471
- }, {
472
- "name": "Markup Inserted",
473
- "scope": "markup.inserted",
474
- "settings": {
475
- "foreground": "#A3BE8C"
476
- }
477
- }, {
478
- "name": "Meta Preprocessor",
479
- "scope": "meta.preprocessor",
480
- "settings": {
481
- "foreground": "#5E81AC"
482
- }
483
- }, {
484
- "name": "Punctuation",
485
- "scope": "punctuation",
486
- "settings": {
487
- "foreground": "#ECEFF4"
488
- }
489
- }, {
490
- "name": "Punctuation Definition Parameters",
491
- "scope": ["punctuation.definition.method-parameters", "punctuation.definition.function-parameters", "punctuation.definition.parameters"],
492
- "settings": {
493
- "foreground": "#ECEFF4"
494
- }
495
- }, {
496
- "name": "Punctuation Definition Tag",
497
- "scope": "punctuation.definition.tag",
498
- "settings": {
499
- "foreground": "#81A1C1"
500
- }
501
- }, {
502
- "name": "Punctuation Definition Comment",
503
- "scope": ["punctuation.definition.comment", "punctuation.end.definition.comment", "punctuation.start.definition.comment"],
504
- "settings": {
505
- "foreground": "#616E88"
506
- }
507
- }, {
508
- "name": "Punctuation Section",
509
- "scope": "punctuation.section",
510
- "settings": {
511
- "foreground": "#ECEFF4"
512
- }
513
- }, {
514
- "name": "Punctuation Section Embedded",
515
- "scope": ["punctuation.section.embedded.begin", "punctuation.section.embedded.end"],
516
- "settings": {
517
- "foreground": "#81A1C1"
518
- }
519
- }, {
520
- "name": "Punctuation Terminator",
521
- "scope": "punctuation.terminator",
522
- "settings": {
523
- "foreground": "#81A1C1"
524
- }
525
- }, {
526
- "name": "Punctuation Variable",
527
- "scope": "punctuation.definition.variable",
528
- "settings": {
529
- "foreground": "#81A1C1"
530
- }
531
- }, {
532
- "name": "Storage",
533
- "scope": "storage",
534
- "settings": {
535
- "foreground": "#81A1C1"
536
- }
537
- }, {
538
- "name": "String",
539
- "scope": "string",
540
- "settings": {
541
- "foreground": "#A3BE8C"
542
- }
543
- }, {
544
- "name": "String Regexp",
545
- "scope": "string.regexp",
546
- "settings": {
547
- "foreground": "#EBCB8B"
548
- }
549
- }, {
550
- "name": "Support Class",
551
- "scope": "support.class",
552
- "settings": {
553
- "foreground": "#8FBCBB"
554
- }
555
- }, {
556
- "name": "Support Constant",
557
- "scope": "support.constant",
558
- "settings": {
559
- "foreground": "#81A1C1"
560
- }
561
- }, {
562
- "name": "Support Function",
563
- "scope": "support.function",
564
- "settings": {
565
- "foreground": "#88C0D0"
566
- }
567
- }, {
568
- "name": "Support Function Construct",
569
- "scope": "support.function.construct",
570
- "settings": {
571
- "foreground": "#81A1C1"
572
- }
573
- }, {
574
- "name": "Support Type",
575
- "scope": "support.type",
576
- "settings": {
577
- "foreground": "#8FBCBB"
578
- }
579
- }, {
580
- "name": "Support Type Exception",
581
- "scope": "support.type.exception",
582
- "settings": {
583
- "foreground": "#8FBCBB"
584
- }
585
- }, {
586
- "name": "Token Debug",
587
- "scope": "token.debug-token",
588
- "settings": {
589
- "foreground": "#b48ead"
590
- }
591
- }, {
592
- "name": "Token Error",
593
- "scope": "token.error-token",
594
- "settings": {
595
- "foreground": "#bf616a"
596
- }
597
- }, {
598
- "name": "Token Info",
599
- "scope": "token.info-token",
600
- "settings": {
601
- "foreground": "#88c0d0"
602
- }
603
- }, {
604
- "name": "Token Warning",
605
- "scope": "token.warn-token",
606
- "settings": {
607
- "foreground": "#ebcb8b"
608
- }
609
- }, {
610
- "name": "Variable",
611
- "scope": "variable.other",
612
- "settings": {
613
- "foreground": "#D8DEE9"
614
- }
615
- }, {
616
- "name": "Variable Language",
617
- "scope": "variable.language",
618
- "settings": {
619
- "foreground": "#81A1C1"
620
- }
621
- }, {
622
- "name": "Variable Parameter",
623
- "scope": "variable.parameter",
624
- "settings": {
625
- "foreground": "#D8DEE9"
626
- }
627
- }, {
628
- "name": "[C/CPP] Punctuation Separator Pointer-Access",
629
- "scope": "punctuation.separator.pointer-access.c",
630
- "settings": {
631
- "foreground": "#81A1C1"
632
- }
633
- }, {
634
- "name": "[C/CPP] Meta Preprocessor Include",
635
- "scope": ["source.c meta.preprocessor.include", "source.c string.quoted.other.lt-gt.include"],
636
- "settings": {
637
- "foreground": "#8FBCBB"
638
- }
639
- }, {
640
- "name": "[C/CPP] Conditional Directive",
641
- "scope": ["source.cpp keyword.control.directive.conditional", "source.cpp punctuation.definition.directive", "source.c keyword.control.directive.conditional", "source.c punctuation.definition.directive"],
642
- "settings": {
643
- "foreground": "#5E81AC",
644
- "fontStyle": "bold"
645
- }
646
- }, {
647
- "name": "[CSS] Constant Other Color RGB Value",
648
- "scope": "source.css constant.other.color.rgb-value",
649
- "settings": {
650
- "foreground": "#B48EAD"
651
- }
652
- }, {
653
- "name": "[CSS](Function) Meta Property-Value",
654
- "scope": "source.css meta.property-value",
655
- "settings": {
656
- "foreground": "#88C0D0"
657
- }
658
- }, {
659
- "name": "[CSS] Media Queries",
660
- "scope": ["source.css keyword.control.at-rule.media", "source.css keyword.control.at-rule.media punctuation.definition.keyword"],
661
- "settings": {
662
- "foreground": "#D08770"
663
- }
664
- }, {
665
- "name": "[CSS] Punctuation Definition Keyword",
666
- "scope": "source.css punctuation.definition.keyword",
667
- "settings": {
668
- "foreground": "#81A1C1"
669
- }
670
- }, {
671
- "name": "[CSS] Support Type Property Name",
672
- "scope": "source.css support.type.property-name",
673
- "settings": {
674
- "foreground": "#D8DEE9"
675
- }
676
- }, {
677
- "name": "[diff] Meta Range Context",
678
- "scope": "source.diff meta.diff.range.context",
679
- "settings": {
680
- "foreground": "#8FBCBB"
681
- }
682
- }, {
683
- "name": "[diff] Meta Header From-File",
684
- "scope": "source.diff meta.diff.header.from-file",
685
- "settings": {
686
- "foreground": "#8FBCBB"
687
- }
688
- }, {
689
- "name": "[diff] Punctuation Definition From-File",
690
- "scope": "source.diff punctuation.definition.from-file",
691
- "settings": {
692
- "foreground": "#8FBCBB"
693
- }
694
- }, {
695
- "name": "[diff] Punctuation Definition Range",
696
- "scope": "source.diff punctuation.definition.range",
697
- "settings": {
698
- "foreground": "#8FBCBB"
699
- }
700
- }, {
701
- "name": "[diff] Punctuation Definition Separator",
702
- "scope": "source.diff punctuation.definition.separator",
703
- "settings": {
704
- "foreground": "#81A1C1"
705
- }
706
- }, {
707
- "name": "[Elixir](JakeBecker.elixir-ls) module names",
708
- "scope": "entity.name.type.module.elixir",
709
- "settings": {
710
- "foreground": "#8FBCBB"
711
- }
712
- }, {
713
- "name": "[Elixir](JakeBecker.elixir-ls) module attributes",
714
- "scope": "variable.other.readwrite.module.elixir",
715
- "settings": {
716
- "foreground": "#D8DEE9",
717
- "fontStyle": "bold"
718
- }
719
- }, {
720
- "name": "[Elixir](JakeBecker.elixir-ls) atoms",
721
- "scope": "constant.other.symbol.elixir",
722
- "settings": {
723
- "foreground": "#D8DEE9",
724
- "fontStyle": "bold"
725
- }
726
- }, {
727
- "name": "[Elixir](JakeBecker.elixir-ls) modules",
728
- "scope": "variable.other.constant.elixir",
729
- "settings": {
730
- "foreground": "#8FBCBB"
731
- }
732
- }, {
733
- "name": "[Go] String Format Placeholder",
734
- "scope": "source.go constant.other.placeholder.go",
735
- "settings": {
736
- "foreground": "#EBCB8B"
737
- }
738
- }, {
739
- "name": "[Java](JavaDoc) Comment Block Documentation HTML Entities",
740
- "scope": "source.java comment.block.documentation.javadoc punctuation.definition.entity.html",
741
- "settings": {
742
- "foreground": "#81A1C1"
743
- }
744
- }, {
745
- "name": "[Java](JavaDoc) Constant Other",
746
- "scope": "source.java constant.other",
747
- "settings": {
748
- "foreground": "#D8DEE9"
749
- }
750
- }, {
751
- "name": "[Java](JavaDoc) Keyword Other Documentation",
752
- "scope": "source.java keyword.other.documentation",
753
- "settings": {
754
- "foreground": "#8FBCBB"
755
- }
756
- }, {
757
- "name": "[Java](JavaDoc) Keyword Other Documentation Author",
758
- "scope": "source.java keyword.other.documentation.author.javadoc",
759
- "settings": {
760
- "foreground": "#8FBCBB"
761
- }
762
- }, {
763
- "name": "[Java](JavaDoc) Keyword Other Documentation Directive/Custom",
764
- "scope": ["source.java keyword.other.documentation.directive", "source.java keyword.other.documentation.custom"],
765
- "settings": {
766
- "foreground": "#8FBCBB"
767
- }
768
- }, {
769
- "name": "[Java](JavaDoc) Keyword Other Documentation See",
770
- "scope": "source.java keyword.other.documentation.see.javadoc",
771
- "settings": {
772
- "foreground": "#8FBCBB"
773
- }
774
- }, {
775
- "name": "[Java] Meta Method-Call",
776
- "scope": "source.java meta.method-call meta.method",
777
- "settings": {
778
- "foreground": "#88C0D0"
779
- }
780
- }, {
781
- "name": "[Java](JavaDoc) Meta Tag Template Link",
782
- "scope": ["source.java meta.tag.template.link.javadoc", "source.java string.other.link.title.javadoc"],
783
- "settings": {
784
- "foreground": "#8FBCBB"
785
- }
786
- }, {
787
- "name": "[Java](JavaDoc) Meta Tag Template Value",
788
- "scope": "source.java meta.tag.template.value.javadoc",
789
- "settings": {
790
- "foreground": "#88C0D0"
791
- }
792
- }, {
793
- "name": "[Java](JavaDoc) Punctuation Definition Keyword",
794
- "scope": "source.java punctuation.definition.keyword.javadoc",
795
- "settings": {
796
- "foreground": "#8FBCBB"
797
- }
798
- }, {
799
- "name": "[Java](JavaDoc) Punctuation Definition Tag",
800
- "scope": ["source.java punctuation.definition.tag.begin.javadoc", "source.java punctuation.definition.tag.end.javadoc"],
801
- "settings": {
802
- "foreground": "#616E88"
803
- }
804
- }, {
805
- "name": "[Java] Storage Modifier Import",
806
- "scope": "source.java storage.modifier.import",
807
- "settings": {
808
- "foreground": "#8FBCBB"
809
- }
810
- }, {
811
- "name": "[Java] Storage Modifier Package",
812
- "scope": "source.java storage.modifier.package",
813
- "settings": {
814
- "foreground": "#8FBCBB"
815
- }
816
- }, {
817
- "name": "[Java] Storage Type",
818
- "scope": "source.java storage.type",
819
- "settings": {
820
- "foreground": "#8FBCBB"
821
- }
822
- }, {
823
- "name": "[Java] Storage Type Annotation",
824
- "scope": "source.java storage.type.annotation",
825
- "settings": {
826
- "foreground": "#D08770"
827
- }
828
- }, {
829
- "name": "[Java] Storage Type Generic",
830
- "scope": "source.java storage.type.generic",
831
- "settings": {
832
- "foreground": "#8FBCBB"
833
- }
834
- }, {
835
- "name": "[Java] Storage Type Primitive",
836
- "scope": "source.java storage.type.primitive",
837
- "settings": {
838
- "foreground": "#81A1C1"
839
- }
840
- }, {
841
- "name": "[JavaScript] Decorator",
842
- "scope": ["source.js punctuation.decorator", "source.js meta.decorator variable.other.readwrite", "source.js meta.decorator entity.name.function"],
843
- "settings": {
844
- "foreground": "#D08770"
845
- }
846
- }, {
847
- "name": "[JavaScript] Meta Object-Literal Key",
848
- "scope": "source.js meta.object-literal.key",
849
- "settings": {
850
- "foreground": "#88C0D0"
851
- }
852
- }, {
853
- "name": "[JavaScript](JSDoc) Storage Type Class",
854
- "scope": "source.js storage.type.class.jsdoc",
855
- "settings": {
856
- "foreground": "#8FBCBB"
857
- }
858
- }, {
859
- "name": "[JavaScript] String Template Literals Punctuation",
860
- "scope": ["source.js string.quoted.template punctuation.quasi.element.begin", "source.js string.quoted.template punctuation.quasi.element.end", "source.js string.template punctuation.definition.template-expression"],
861
- "settings": {
862
- "foreground": "#81A1C1"
863
- }
864
- }, {
865
- "name": "[JavaScript] Interpolated String Template Punctuation Functions",
866
- "scope": "source.js string.quoted.template meta.method-call.with-arguments",
867
- "settings": {
868
- "foreground": "#ECEFF4"
869
- }
870
- }, {
871
- "name": "[JavaScript] String Template Literal Variable",
872
- "scope": ["source.js string.template meta.template.expression support.variable.property", "source.js string.template meta.template.expression variable.other.object"],
873
- "settings": {
874
- "foreground": "#D8DEE9"
875
- }
876
- }, {
877
- "name": "[JavaScript] Support Type Primitive",
878
- "scope": "source.js support.type.primitive",
879
- "settings": {
880
- "foreground": "#81A1C1"
881
- }
882
- }, {
883
- "name": "[JavaScript] Variable Other Object",
884
- "scope": "source.js variable.other.object",
885
- "settings": {
886
- "foreground": "#D8DEE9"
887
- }
888
- }, {
889
- "name": "[JavaScript] Variable Other Read-Write Alias",
890
- "scope": "source.js variable.other.readwrite.alias",
891
- "settings": {
892
- "foreground": "#8FBCBB"
893
- }
894
- }, {
895
- "name": "[JavaScript] Parentheses in Template Strings",
896
- "scope": ["source.js meta.embedded.line meta.brace.square", "source.js meta.embedded.line meta.brace.round", "source.js string.quoted.template meta.brace.square", "source.js string.quoted.template meta.brace.round"],
897
- "settings": {
898
- "foreground": "#ECEFF4"
899
- }
900
- }, {
901
- "name": "[HTML] Constant Character Entity",
902
- "scope": "text.html.basic constant.character.entity.html",
903
- "settings": {
904
- "foreground": "#EBCB8B"
905
- }
906
- }, {
907
- "name": "[HTML] Constant Other Inline-Data",
908
- "scope": "text.html.basic constant.other.inline-data",
909
- "settings": {
910
- "foreground": "#D08770",
911
- "fontStyle": "italic"
912
- }
913
- }, {
914
- "name": "[HTML] Meta Tag SGML Doctype",
915
- "scope": "text.html.basic meta.tag.sgml.doctype",
916
- "settings": {
917
- "foreground": "#5E81AC"
918
- }
919
- }, {
920
- "name": "[HTML] Punctuation Definition Entity",
921
- "scope": "text.html.basic punctuation.definition.entity",
922
- "settings": {
923
- "foreground": "#81A1C1"
924
- }
925
- }, {
926
- "name": "[INI] Entity Name Section Group-Title",
927
- "scope": "source.properties entity.name.section.group-title.ini",
928
- "settings": {
929
- "foreground": "#88C0D0"
930
- }
931
- }, {
932
- "name": "[INI] Punctuation Separator Key-Value",
933
- "scope": "source.properties punctuation.separator.key-value.ini",
934
- "settings": {
935
- "foreground": "#81A1C1"
936
- }
937
- }, {
938
- "name": "[Markdown] Markup Fenced Code Block",
939
- "scope": ["text.html.markdown markup.fenced_code.block", "text.html.markdown markup.fenced_code.block punctuation.definition"],
940
- "settings": {
941
- "foreground": "#8FBCBB"
942
- }
943
- }, {
944
- "name": "[Markdown] Markup Heading",
945
- "scope": "markup.heading",
946
- "settings": {
947
- "foreground": "#88C0D0"
948
- }
949
- }, {
950
- "name": "[Markdown] Markup Inline",
951
- "scope": ["text.html.markdown markup.inline.raw", "text.html.markdown markup.inline.raw punctuation.definition.raw"],
952
- "settings": {
953
- "foreground": "#8FBCBB"
954
- }
955
- }, {
956
- "name": "[Markdown] Markup Italic",
957
- "scope": "text.html.markdown markup.italic",
958
- "settings": {
959
- "fontStyle": "italic"
960
- }
961
- }, {
962
- "name": "[Markdown] Markup Link",
963
- "scope": "text.html.markdown markup.underline.link",
964
- "settings": {
965
- "fontStyle": "underline"
966
- }
967
- }, {
968
- "name": "[Markdown] Markup List Numbered/Unnumbered",
969
- "scope": "text.html.markdown beginning.punctuation.definition.list",
970
- "settings": {
971
- "foreground": "#81A1C1"
972
- }
973
- }, {
974
- "name": "[Markdown] Markup Quote Punctuation Definition",
975
- "scope": "text.html.markdown beginning.punctuation.definition.quote",
976
- "settings": {
977
- "foreground": "#8FBCBB"
978
- }
979
- }, {
980
- "name": "[Markdown] Markup Quote Punctuation Definition",
981
- "scope": "text.html.markdown markup.quote",
982
- "settings": {
983
- "foreground": "#616E88"
984
- }
985
- }, {
986
- "name": "[Markdown] Markup Math Constant",
987
- "scope": "text.html.markdown constant.character.math.tex",
988
- "settings": {
989
- "foreground": "#81A1C1"
990
- }
991
- }, {
992
- "name": "[Markdown] Markup Math Definition Marker",
993
- "scope": ["text.html.markdown punctuation.definition.math.begin", "text.html.markdown punctuation.definition.math.end"],
994
- "settings": {
995
- "foreground": "#5E81AC"
996
- }
997
- }, {
998
- "name": "[Markdown] Markup Math Function Definition Marker",
999
- "scope": "text.html.markdown punctuation.definition.function.math.tex",
1000
- "settings": {
1001
- "foreground": "#88C0D0"
1002
- }
1003
- }, {
1004
- "name": "[Markdown] Markup Math Operator",
1005
- "scope": "text.html.markdown punctuation.math.operator.latex",
1006
- "settings": {
1007
- "foreground": "#81A1C1"
1008
- }
1009
- }, {
1010
- "name": "[Markdown] Punctuation Definition Heading",
1011
- "scope": "text.html.markdown punctuation.definition.heading",
1012
- "settings": {
1013
- "foreground": "#81A1C1"
1014
- }
1015
- }, {
1016
- "name": "[Markdown] Punctuation Definition Constant/String",
1017
- "scope": ["text.html.markdown punctuation.definition.constant", "text.html.markdown punctuation.definition.string"],
1018
- "settings": {
1019
- "foreground": "#81A1C1"
1020
- }
1021
- }, {
1022
- "name": "[Markdown] String Other Link Description/Title",
1023
- "scope": ["text.html.markdown constant.other.reference.link", "text.html.markdown string.other.link.description", "text.html.markdown string.other.link.title"],
1024
- "settings": {
1025
- "foreground": "#88C0D0"
1026
- }
1027
- }, {
1028
- "name": "[Perl] Perl Sigils",
1029
- "scope": "source.perl punctuation.definition.variable",
1030
- "settings": {
1031
- "foreground": "#D8DEE9"
1032
- }
1033
- }, {
1034
- "name": "[PHP] Meta Function-Call Object",
1035
- "scope": ["source.php meta.function-call", "source.php meta.function-call.object"],
1036
- "settings": {
1037
- "foreground": "#88C0D0"
1038
- }
1039
- }, {
1040
- "name": "[Python] Decorator",
1041
- "scope": ["source.python entity.name.function.decorator", "source.python meta.function.decorator support.type"],
1042
- "settings": {
1043
- "foreground": "#D08770"
1044
- }
1045
- }, {
1046
- "name": "[Python] Function Call",
1047
- "scope": "source.python meta.function-call.generic",
1048
- "settings": {
1049
- "foreground": "#88C0D0"
1050
- }
1051
- }, {
1052
- "name": "[Python] Support Type",
1053
- "scope": "source.python support.type",
1054
- "settings": {
1055
- "foreground": "#88C0D0"
1056
- }
1057
- }, {
1058
- "name": "[Python] Function Parameter",
1059
- "scope": ["source.python variable.parameter.function.language"],
1060
- "settings": {
1061
- "foreground": "#D8DEE9"
1062
- }
1063
- }, {
1064
- "name": "[Python] Function Parameter Special",
1065
- "scope": ["source.python meta.function.parameters variable.parameter.function.language.special.self"],
1066
- "settings": {
1067
- "foreground": "#81A1C1"
1068
- }
1069
- }, {
1070
- "name": "[Rust] Entity types",
1071
- "scope": "source.rust entity.name.type",
1072
- "settings": {
1073
- "foreground": "#8FBCBB"
1074
- }
1075
- }, {
1076
- "name": "[Rust] Macro",
1077
- "scope": "source.rust meta.macro entity.name.function",
1078
- "settings": {
1079
- "fontStyle": "bold",
1080
- "foreground": "#88C0D0"
1081
- }
1082
- }, {
1083
- "name": "[Rust] Attributes",
1084
- "scope": ["source.rust meta.attribute", "source.rust meta.attribute punctuation", "source.rust meta.attribute keyword.operator"],
1085
- "settings": {
1086
- "foreground": "#5E81AC"
1087
- }
1088
- }, {
1089
- "name": "[Rust] Traits",
1090
- "scope": "source.rust entity.name.type.trait",
1091
- "settings": {
1092
- "fontStyle": "bold"
1093
- }
1094
- }, {
1095
- "name": "[Rust] Interpolation Bracket Curly",
1096
- "scope": "source.rust punctuation.definition.interpolation",
1097
- "settings": {
1098
- "foreground": "#EBCB8B"
1099
- }
1100
- }, {
1101
- "name": "[SCSS] Punctuation Definition Interpolation Bracket Curly",
1102
- "scope": ["source.css.scss punctuation.definition.interpolation.begin.bracket.curly", "source.css.scss punctuation.definition.interpolation.end.bracket.curly"],
1103
- "settings": {
1104
- "foreground": "#81A1C1"
1105
- }
1106
- }, {
1107
- "name": "[SCSS] Variable Interpolation",
1108
- "scope": "source.css.scss variable.interpolation",
1109
- "settings": {
1110
- "foreground": "#D8DEE9",
1111
- "fontStyle": "italic"
1112
- }
1113
- }, {
1114
- "name": "[TypeScript] Decorators",
1115
- "scope": ["source.ts punctuation.decorator", "source.ts meta.decorator variable.other.readwrite", "source.ts meta.decorator entity.name.function", "source.tsx punctuation.decorator", "source.tsx meta.decorator variable.other.readwrite", "source.tsx meta.decorator entity.name.function"],
1116
- "settings": {
1117
- "foreground": "#D08770"
1118
- }
1119
- }, {
1120
- "name": "[TypeScript] Object-literal keys",
1121
- "scope": ["source.ts meta.object-literal.key", "source.tsx meta.object-literal.key"],
1122
- "settings": {
1123
- "foreground": "#D8DEE9"
1124
- }
1125
- }, {
1126
- "name": "[TypeScript] Object-literal functions",
1127
- "scope": ["source.ts meta.object-literal.key entity.name.function", "source.tsx meta.object-literal.key entity.name.function"],
1128
- "settings": {
1129
- "foreground": "#88C0D0"
1130
- }
1131
- }, {
1132
- "name": "[TypeScript] Type/Class",
1133
- "scope": ["source.ts support.class", "source.ts support.type", "source.ts entity.name.type", "source.ts entity.name.class", "source.tsx support.class", "source.tsx support.type", "source.tsx entity.name.type", "source.tsx entity.name.class"],
1134
- "settings": {
1135
- "foreground": "#8FBCBB"
1136
- }
1137
- }, {
1138
- "name": "[TypeScript] Static Class Support",
1139
- "scope": ["source.ts support.constant.math", "source.ts support.constant.dom", "source.ts support.constant.json", "source.tsx support.constant.math", "source.tsx support.constant.dom", "source.tsx support.constant.json"],
1140
- "settings": {
1141
- "foreground": "#8FBCBB"
1142
- }
1143
- }, {
1144
- "name": "[TypeScript] Variables",
1145
- "scope": ["source.ts support.variable", "source.tsx support.variable"],
1146
- "settings": {
1147
- "foreground": "#D8DEE9"
1148
- }
1149
- }, {
1150
- "name": "[TypeScript] Parentheses in Template Strings",
1151
- "scope": ["source.ts meta.embedded.line meta.brace.square", "source.ts meta.embedded.line meta.brace.round", "source.tsx meta.embedded.line meta.brace.square", "source.tsx meta.embedded.line meta.brace.round"],
1152
- "settings": {
1153
- "foreground": "#ECEFF4"
1154
- }
1155
- }, {
1156
- "name": "[XML] Entity Name Tag Namespace",
1157
- "scope": "text.xml entity.name.tag.namespace",
1158
- "settings": {
1159
- "foreground": "#8FBCBB"
1160
- }
1161
- }, {
1162
- "name": "[XML] Keyword Other Doctype",
1163
- "scope": "text.xml keyword.other.doctype",
1164
- "settings": {
1165
- "foreground": "#5E81AC"
1166
- }
1167
- }, {
1168
- "name": "[XML] Meta Tag Preprocessor",
1169
- "scope": "text.xml meta.tag.preprocessor entity.name.tag",
1170
- "settings": {
1171
- "foreground": "#5E81AC"
1172
- }
1173
- }, {
1174
- "name": "[XML] Entity Name Tag Namespace",
1175
- "scope": ["text.xml string.unquoted.cdata", "text.xml string.unquoted.cdata punctuation.definition.string"],
1176
- "settings": {
1177
- "foreground": "#D08770",
1178
- "fontStyle": "italic"
1179
- }
1180
- }, {
1181
- "name": "[YAML] Entity Name Tag",
1182
- "scope": "source.yaml entity.name.tag",
1183
- "settings": {
1184
- "foreground": "#8FBCBB"
1185
- }
1186
- }]
1187
- },
1188
- "autoImport": true,
1189
- "showCopyButton": true,
1190
- "skipLanguages": [],
1191
- "filepath": "/Users/bytedance/github/targeral/modern-dev/website/module-tools/docs/zh/guide/basic/test-your-project.mdx"
1192
- };
1193
- const frontmatter = {
1194
- "sidebar_position": 6
1195
- };
1196
- const toc = [{
1197
- "id": "先决条件和约定",
1198
- "text": "先决条件和约定",
1199
- "depth": 2
1200
- }, {
1201
- "id": "运行测试",
1202
- "text": "运行测试",
1203
- "depth": 2
1204
- }, {
1205
- "id": "使用配置",
1206
- "text": "使用配置",
1207
- "depth": 2
1208
- }, {
1209
- "id": "测试示例",
1210
- "text": "测试示例",
1211
- "depth": 2
1212
- }, {
1213
- "id": "普通模块",
1214
- "text": "普通模块",
1215
- "depth": 3
1216
- }, {
1217
- "id": "组件",
1218
- "text": "组件",
1219
- "depth": 3
1220
- }];
1221
- const title = `测试项目`;
1222
- const content = "\"---\\nsidebar_position: 6\\n---\\n\\n# 测试项目\\n\\n本章将要介绍如何测试可复用模块。\\n\\n## 先决条件和约定\\n\\n想要使用项目的测试功能,需要确保项目中包含依赖:`\\\"@modern-js/plugin-testing\\\"`,以及按照类似下面的内容进行配置:\\n\\n``` ts\\nimport moduleTools, { defineConfig } from '@modern-js/module-tools';\\nimport testPlugin from '@modern-js/plugin-testing';\\n\\nexport default defineConfig({\\n plugins: [\\n moduleTools(),\\n testPlugin(),\\n ],\\n});\\n```\\n\\n可以通过执行 [`modern new`](/guide/basic/command-preview#modern-new) 命令来开启测试功能。\\n\\n在模块工程方案中,对于测试用例或者说编写测试的文件有如下约定:\\n\\n- 项目目录下的 `tests` 目录为测试用例和测试文件的目录,**不支持更改运行测试用例的目录**。\\n- 默认会自动将后缀为 `.test.[tj]sx?` 的文件识别为测试文件。\\n- 其他的 `.[tj]sx?` 后缀的文件被识别为普通的文件,可以用于测试的 `utils` 文件或者其他用途。\\n\\n## 运行测试\\n\\n当准备好了依赖、增加了相关配置以及了解了测试用例在哪里编写后,我们可以通过以下命令来执行测试:\\n\\n```bash\\nmodern test\\n\\n// 更新 snapshot\\nmodern test --updateSnapshot\\n```\\n\\n执行之后,会看到测试的结果:\\n\\n![test-result](https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/test-result.png)\\n\\n## 使用配置\\n\\n模块工程方案对测试提供了以下配置:\\n\\n- [`testing`](/api/config/testing)\\n\\n可以在 `modern.config.(j|t)s` 中增加它。\\n\\n## 测试示例\\n\\n### 普通模块\\n\\n对于普通的模块,我们可以按照如下方式使用测试功能:\\n\\n<CH.Spotlight>\\n\\n```typescript ./src/index.ts\\nexport default function () {\\n return 'hello world';\\n}\\n```\\n\\n---\\n\\n首先是模块的代码。\\n\\n```typescript ./src/index.ts\\nexport default function () {\\n return 'hello world';\\n}\\n```\\n\\n---\\n\\n然后在测试文件中,我们可以这样。\\n\\n其中 `@` 指向了源码目录,在初始化项目的 `tests/tsconfig.json` 的 `paths` 中定义了。\\n\\n```typescript ./tests/index.test.ts\\nimport main from '@/index';\\n\\ndescribe('默认值 cases', () => {\\n test('Have returns', () => {\\n const drink = jest.fn(main);\\n drink();\\n expect(drink).toHaveReturned();\\n });\\n});\\n```\\n\\n---\\n\\n最后我们可以执行 `modern test`。\\n\\n```bash\\npnpm test\\n## or\\nyarn test\\n## or\\nnpm run test\\n```\\n\\n</CH.Spotlight>\\n\\n### 组件\\n\\n{/* 链接待补充 */}\\n\\n对于组件,Modern.js 的 Runtime API 提供了用于测试 UI 组件的功能,其功能由 `@modern-js/runtime/testing` 提供。\\n\\n:::tip\\n如果需要使用 Runtime API,那么可以通过 [微生成器](/guide/basic/command-preview) 开启。\\n:::\\n\\n<CH.Spotlight>\\n\\n```tsx ./src/index.tsx\\nexport const default () {\\n return (\\n <div>This is a UI Component</div>\\n );\\n}\\n```\\n\\n---\\n\\n首先是组件的代码。\\n\\n```tsx ./src/index.tsx\\nexport const default () {\\n return (\\n <div>This is a UI Component</div>\\n );\\n}\\n```\\n\\n---\\n\\n然后在测试文件中,我们可以这样。\\n\\n其中 `@` 指向了源码目录,在初始化项目的 `tests/tsconfig.json` 的 `paths` 中定义了。\\n\\n```tsx ./tests/index.test.tsx\\nimport { render, screen } from '@modern-js/runtime/testing';\\n\\nimport Component from '@/index';\\n\\ndescribe('默认值 cases', () => {\\n test('Rendered', () => {\\n render(<Component />);\\n expect(screen.getByText('This is a UI Component')).toBeInTheDocument();\\n });\\n});\\n```\\n\\n---\\n\\n最后我们可以执行 `modern test`。\\n\\n```bash\\npnpm test\\n## or\\nyarn test\\n## or\\nnpm run test\\n```\\n\\n</CH.Spotlight>\\n\"";
1223
- function _createMdxContent(props) {
1224
- const _components = Object.assign({
1225
- h1: "h1",
1226
- a: "a",
1227
- p: "p",
1228
- h2: "h2",
1229
- code: "code",
1230
- ul: "ul",
1231
- li: "li",
1232
- strong: "strong",
1233
- img: "img",
1234
- h3: "h3",
1235
- div: "div"
1236
- }, props.components);
1237
- if (!CH) _missingMdxReference("CH", false, "13:1-23:4");
1238
- if (!CH.Code) _missingMdxReference("CH.Code", true, "13:1-23:4");
1239
- if (!CH.CodeSlot) _missingMdxReference("CH.CodeSlot", true);
1240
- if (!CH.Spotlight) _missingMdxReference("CH.Spotlight", true, "62:1-110:16");
1241
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
1242
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h1, {
1243
- id: "测试项目",
1244
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1245
- className: "header-anchor",
1246
- "aria-hidden": "true",
1247
- href: "#测试项目",
1248
- children: "#"
1249
- }), "测试项目"]
1250
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1251
- children: "本章将要介绍如何测试可复用模块。"
1252
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
1253
- id: "先决条件和约定",
1254
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1255
- className: "header-anchor",
1256
- "aria-hidden": "true",
1257
- href: "#先决条件和约定",
1258
- children: "#"
1259
- }), "先决条件和约定"]
1260
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1261
- children: ["想要使用项目的测试功能,需要确保项目中包含依赖:", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1262
- children: "\"@modern-js/plugin-testing\""
1263
- }), ",以及按照类似下面的内容进行配置:"]
1264
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.Code, {
1265
- codeConfig: chCodeConfig,
1266
- northPanel: {
1267
- "tabs": [""],
1268
- "active": "",
1269
- "heightRatio": 1
1270
- },
1271
- files: [{
1272
- "name": "",
1273
- "focus": "",
1274
- "code": {
1275
- "lines": [{
1276
- "tokens": [{
1277
- "content": "import",
1278
- "props": {
1279
- "style": {
1280
- "color": "#81A1C1"
1281
- }
1282
- }
1283
- }, {
1284
- "content": " ",
1285
- "props": {
1286
- "style": {
1287
- "color": "#D8DEE9FF"
1288
- }
1289
- }
1290
- }, {
1291
- "content": "moduleTools",
1292
- "props": {
1293
- "style": {
1294
- "color": "#D8DEE9"
1295
- }
1296
- }
1297
- }, {
1298
- "content": ",",
1299
- "props": {
1300
- "style": {
1301
- "color": "#ECEFF4"
1302
- }
1303
- }
1304
- }, {
1305
- "content": " ",
1306
- "props": {
1307
- "style": {
1308
- "color": "#D8DEE9FF"
1309
- }
1310
- }
1311
- }, {
1312
- "content": "{",
1313
- "props": {
1314
- "style": {
1315
- "color": "#ECEFF4"
1316
- }
1317
- }
1318
- }, {
1319
- "content": " ",
1320
- "props": {
1321
- "style": {
1322
- "color": "#D8DEE9FF"
1323
- }
1324
- }
1325
- }, {
1326
- "content": "defineConfig",
1327
- "props": {
1328
- "style": {
1329
- "color": "#D8DEE9"
1330
- }
1331
- }
1332
- }, {
1333
- "content": " ",
1334
- "props": {
1335
- "style": {
1336
- "color": "#D8DEE9FF"
1337
- }
1338
- }
1339
- }, {
1340
- "content": "}",
1341
- "props": {
1342
- "style": {
1343
- "color": "#ECEFF4"
1344
- }
1345
- }
1346
- }, {
1347
- "content": " ",
1348
- "props": {
1349
- "style": {
1350
- "color": "#D8DEE9FF"
1351
- }
1352
- }
1353
- }, {
1354
- "content": "from",
1355
- "props": {
1356
- "style": {
1357
- "color": "#81A1C1"
1358
- }
1359
- }
1360
- }, {
1361
- "content": " ",
1362
- "props": {
1363
- "style": {
1364
- "color": "#D8DEE9FF"
1365
- }
1366
- }
1367
- }, {
1368
- "content": "'",
1369
- "props": {
1370
- "style": {
1371
- "color": "#ECEFF4"
1372
- }
1373
- }
1374
- }, {
1375
- "content": "@modern-js/module-tools",
1376
- "props": {
1377
- "style": {
1378
- "color": "#A3BE8C"
1379
- }
1380
- }
1381
- }, {
1382
- "content": "'",
1383
- "props": {
1384
- "style": {
1385
- "color": "#ECEFF4"
1386
- }
1387
- }
1388
- }, {
1389
- "content": ";",
1390
- "props": {
1391
- "style": {
1392
- "color": "#81A1C1"
1393
- }
1394
- }
1395
- }]
1396
- }, {
1397
- "tokens": [{
1398
- "content": "import",
1399
- "props": {
1400
- "style": {
1401
- "color": "#81A1C1"
1402
- }
1403
- }
1404
- }, {
1405
- "content": " ",
1406
- "props": {
1407
- "style": {
1408
- "color": "#D8DEE9FF"
1409
- }
1410
- }
1411
- }, {
1412
- "content": "testPlugin",
1413
- "props": {
1414
- "style": {
1415
- "color": "#D8DEE9"
1416
- }
1417
- }
1418
- }, {
1419
- "content": " ",
1420
- "props": {
1421
- "style": {
1422
- "color": "#D8DEE9FF"
1423
- }
1424
- }
1425
- }, {
1426
- "content": "from",
1427
- "props": {
1428
- "style": {
1429
- "color": "#81A1C1"
1430
- }
1431
- }
1432
- }, {
1433
- "content": " ",
1434
- "props": {
1435
- "style": {
1436
- "color": "#D8DEE9FF"
1437
- }
1438
- }
1439
- }, {
1440
- "content": "'",
1441
- "props": {
1442
- "style": {
1443
- "color": "#ECEFF4"
1444
- }
1445
- }
1446
- }, {
1447
- "content": "@modern-js/plugin-testing",
1448
- "props": {
1449
- "style": {
1450
- "color": "#A3BE8C"
1451
- }
1452
- }
1453
- }, {
1454
- "content": "'",
1455
- "props": {
1456
- "style": {
1457
- "color": "#ECEFF4"
1458
- }
1459
- }
1460
- }, {
1461
- "content": ";",
1462
- "props": {
1463
- "style": {
1464
- "color": "#81A1C1"
1465
- }
1466
- }
1467
- }]
1468
- }, {
1469
- "tokens": []
1470
- }, {
1471
- "tokens": [{
1472
- "content": "export",
1473
- "props": {
1474
- "style": {
1475
- "color": "#81A1C1"
1476
- }
1477
- }
1478
- }, {
1479
- "content": " ",
1480
- "props": {
1481
- "style": {
1482
- "color": "#D8DEE9FF"
1483
- }
1484
- }
1485
- }, {
1486
- "content": "default",
1487
- "props": {
1488
- "style": {
1489
- "color": "#81A1C1"
1490
- }
1491
- }
1492
- }, {
1493
- "content": " ",
1494
- "props": {
1495
- "style": {
1496
- "color": "#D8DEE9FF"
1497
- }
1498
- }
1499
- }, {
1500
- "content": "defineConfig",
1501
- "props": {
1502
- "style": {
1503
- "color": "#88C0D0"
1504
- }
1505
- }
1506
- }, {
1507
- "content": "(",
1508
- "props": {
1509
- "style": {
1510
- "color": "#D8DEE9FF"
1511
- }
1512
- }
1513
- }, {
1514
- "content": "{",
1515
- "props": {
1516
- "style": {
1517
- "color": "#ECEFF4"
1518
- }
1519
- }
1520
- }]
1521
- }, {
1522
- "tokens": [{
1523
- "content": " ",
1524
- "props": {
1525
- "style": {
1526
- "color": "#D8DEE9FF"
1527
- }
1528
- }
1529
- }, {
1530
- "content": "plugins",
1531
- "props": {
1532
- "style": {
1533
- "color": "#D8DEE9"
1534
- }
1535
- }
1536
- }, {
1537
- "content": ":",
1538
- "props": {
1539
- "style": {
1540
- "color": "#ECEFF4"
1541
- }
1542
- }
1543
- }, {
1544
- "content": " [",
1545
- "props": {
1546
- "style": {
1547
- "color": "#D8DEE9FF"
1548
- }
1549
- }
1550
- }]
1551
- }, {
1552
- "tokens": [{
1553
- "content": " ",
1554
- "props": {
1555
- "style": {
1556
- "color": "#D8DEE9FF"
1557
- }
1558
- }
1559
- }, {
1560
- "content": "moduleTools",
1561
- "props": {
1562
- "style": {
1563
- "color": "#88C0D0"
1564
- }
1565
- }
1566
- }, {
1567
- "content": "()",
1568
- "props": {
1569
- "style": {
1570
- "color": "#D8DEE9FF"
1571
- }
1572
- }
1573
- }, {
1574
- "content": ",",
1575
- "props": {
1576
- "style": {
1577
- "color": "#ECEFF4"
1578
- }
1579
- }
1580
- }]
1581
- }, {
1582
- "tokens": [{
1583
- "content": " ",
1584
- "props": {
1585
- "style": {
1586
- "color": "#D8DEE9FF"
1587
- }
1588
- }
1589
- }, {
1590
- "content": "testPlugin",
1591
- "props": {
1592
- "style": {
1593
- "color": "#88C0D0"
1594
- }
1595
- }
1596
- }, {
1597
- "content": "()",
1598
- "props": {
1599
- "style": {
1600
- "color": "#D8DEE9FF"
1601
- }
1602
- }
1603
- }, {
1604
- "content": ",",
1605
- "props": {
1606
- "style": {
1607
- "color": "#ECEFF4"
1608
- }
1609
- }
1610
- }]
1611
- }, {
1612
- "tokens": [{
1613
- "content": " ]",
1614
- "props": {
1615
- "style": {
1616
- "color": "#D8DEE9FF"
1617
- }
1618
- }
1619
- }, {
1620
- "content": ",",
1621
- "props": {
1622
- "style": {
1623
- "color": "#ECEFF4"
1624
- }
1625
- }
1626
- }]
1627
- }, {
1628
- "tokens": [{
1629
- "content": "}",
1630
- "props": {
1631
- "style": {
1632
- "color": "#ECEFF4"
1633
- }
1634
- }
1635
- }, {
1636
- "content": ")",
1637
- "props": {
1638
- "style": {
1639
- "color": "#D8DEE9FF"
1640
- }
1641
- }
1642
- }, {
1643
- "content": ";",
1644
- "props": {
1645
- "style": {
1646
- "color": "#81A1C1"
1647
- }
1648
- }
1649
- }]
1650
- }],
1651
- "lang": "ts"
1652
- },
1653
- "annotations": []
1654
- }]
1655
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1656
- children: ["可以通过执行 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1657
- href: "/module-tools/guide/basic/command-preview.html#modern-new",
1658
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1659
- children: "modern new"
1660
- })
1661
- }), " 命令来开启测试功能。"]
1662
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1663
- children: "在模块工程方案中,对于测试用例或者说编写测试的文件有如下约定:"
1664
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
1665
- children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
1666
- children: ["项目目录下的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1667
- children: "tests"
1668
- }), " 目录为测试用例和测试文件的目录,", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.strong, {
1669
- children: "不支持更改运行测试用例的目录"
1670
- }), "。"]
1671
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
1672
- children: ["默认会自动将后缀为 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1673
- children: ".test.[tj]sx?"
1674
- }), " 的文件识别为测试文件。"]
1675
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
1676
- children: ["其他的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1677
- children: ".[tj]sx?"
1678
- }), " 后缀的文件被识别为普通的文件,可以用于测试的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1679
- children: "utils"
1680
- }), " 文件或者其他用途。"]
1681
- }), "\n"]
1682
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
1683
- id: "运行测试",
1684
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1685
- className: "header-anchor",
1686
- "aria-hidden": "true",
1687
- href: "#运行测试",
1688
- children: "#"
1689
- }), "运行测试"]
1690
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1691
- children: "当准备好了依赖、增加了相关配置以及了解了测试用例在哪里编写后,我们可以通过以下命令来执行测试:"
1692
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.Code, {
1693
- codeConfig: chCodeConfig,
1694
- northPanel: {
1695
- "tabs": [""],
1696
- "active": "",
1697
- "heightRatio": 1
1698
- },
1699
- files: [{
1700
- "name": "",
1701
- "focus": "",
1702
- "code": {
1703
- "lines": [{
1704
- "tokens": [{
1705
- "content": "modern ",
1706
- "props": {
1707
- "style": {
1708
- "color": "#D8DEE9FF"
1709
- }
1710
- }
1711
- }, {
1712
- "content": "test",
1713
- "props": {
1714
- "style": {
1715
- "color": "#88C0D0"
1716
- }
1717
- }
1718
- }]
1719
- }, {
1720
- "tokens": []
1721
- }, {
1722
- "tokens": [{
1723
- "content": "// 更新 snapshot",
1724
- "props": {
1725
- "style": {
1726
- "color": "#D8DEE9FF"
1727
- }
1728
- }
1729
- }]
1730
- }, {
1731
- "tokens": [{
1732
- "content": "modern ",
1733
- "props": {
1734
- "style": {
1735
- "color": "#D8DEE9FF"
1736
- }
1737
- }
1738
- }, {
1739
- "content": "test",
1740
- "props": {
1741
- "style": {
1742
- "color": "#88C0D0"
1743
- }
1744
- }
1745
- }, {
1746
- "content": " --updateSnapshot",
1747
- "props": {
1748
- "style": {
1749
- "color": "#D8DEE9FF"
1750
- }
1751
- }
1752
- }]
1753
- }],
1754
- "lang": "bash"
1755
- },
1756
- "annotations": []
1757
- }]
1758
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1759
- children: "执行之后,会看到测试的结果:"
1760
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1761
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.img, {
1762
- src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/test-result.png",
1763
- alt: "test-result"
1764
- })
1765
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
1766
- id: "使用配置",
1767
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1768
- className: "header-anchor",
1769
- "aria-hidden": "true",
1770
- href: "#使用配置",
1771
- children: "#"
1772
- }), "使用配置"]
1773
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1774
- children: "模块工程方案对测试提供了以下配置:"
1775
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
1776
- children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
1777
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1778
- href: "/module-tools/api/config/testing.html",
1779
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1780
- children: "testing"
1781
- })
1782
- })
1783
- }), "\n"]
1784
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
1785
- children: ["可以在 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
1786
- children: "modern.config.(j|t)s"
1787
- }), " 中增加它。"]
1788
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
1789
- id: "测试示例",
1790
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1791
- className: "header-anchor",
1792
- "aria-hidden": "true",
1793
- href: "#测试示例",
1794
- children: "#"
1795
- }), "测试示例"]
1796
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h3, {
1797
- id: "普通模块",
1798
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
1799
- className: "header-anchor",
1800
- "aria-hidden": "true",
1801
- href: "#普通模块",
1802
- children: "#"
1803
- }), "普通模块"]
1804
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
1805
- children: "对于普通的模块,我们可以按照如下方式使用测试功能:"
1806
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(CH.Spotlight, {
1807
- codeConfig: chCodeConfig,
1808
- editorSteps: [{
1809
- "northPanel": {
1810
- "tabs": ["./src/index.ts"],
1811
- "active": "./src/index.ts",
1812
- "heightRatio": 1
1813
- },
1814
- "files": [{
1815
- "name": "./src/index.ts",
1816
- "focus": "",
1817
- "code": {
1818
- "lines": [{
1819
- "tokens": [{
1820
- "content": "export",
1821
- "props": {
1822
- "style": {
1823
- "color": "#81A1C1"
1824
- }
1825
- }
1826
- }, {
1827
- "content": " ",
1828
- "props": {
1829
- "style": {
1830
- "color": "#D8DEE9FF"
1831
- }
1832
- }
1833
- }, {
1834
- "content": "default",
1835
- "props": {
1836
- "style": {
1837
- "color": "#81A1C1"
1838
- }
1839
- }
1840
- }, {
1841
- "content": " ",
1842
- "props": {
1843
- "style": {
1844
- "color": "#D8DEE9FF"
1845
- }
1846
- }
1847
- }, {
1848
- "content": "function",
1849
- "props": {
1850
- "style": {
1851
- "color": "#81A1C1"
1852
- }
1853
- }
1854
- }, {
1855
- "content": " ",
1856
- "props": {
1857
- "style": {
1858
- "color": "#D8DEE9FF"
1859
- }
1860
- }
1861
- }, {
1862
- "content": "()",
1863
- "props": {
1864
- "style": {
1865
- "color": "#ECEFF4"
1866
- }
1867
- }
1868
- }, {
1869
- "content": " ",
1870
- "props": {
1871
- "style": {
1872
- "color": "#D8DEE9FF"
1873
- }
1874
- }
1875
- }, {
1876
- "content": "{",
1877
- "props": {
1878
- "style": {
1879
- "color": "#ECEFF4"
1880
- }
1881
- }
1882
- }]
1883
- }, {
1884
- "tokens": [{
1885
- "content": " ",
1886
- "props": {
1887
- "style": {
1888
- "color": "#D8DEE9FF"
1889
- }
1890
- }
1891
- }, {
1892
- "content": "return",
1893
- "props": {
1894
- "style": {
1895
- "color": "#81A1C1"
1896
- }
1897
- }
1898
- }, {
1899
- "content": " ",
1900
- "props": {
1901
- "style": {
1902
- "color": "#D8DEE9FF"
1903
- }
1904
- }
1905
- }, {
1906
- "content": "'",
1907
- "props": {
1908
- "style": {
1909
- "color": "#ECEFF4"
1910
- }
1911
- }
1912
- }, {
1913
- "content": "hello world",
1914
- "props": {
1915
- "style": {
1916
- "color": "#A3BE8C"
1917
- }
1918
- }
1919
- }, {
1920
- "content": "'",
1921
- "props": {
1922
- "style": {
1923
- "color": "#ECEFF4"
1924
- }
1925
- }
1926
- }, {
1927
- "content": ";",
1928
- "props": {
1929
- "style": {
1930
- "color": "#81A1C1"
1931
- }
1932
- }
1933
- }]
1934
- }, {
1935
- "tokens": [{
1936
- "content": "}",
1937
- "props": {
1938
- "style": {
1939
- "color": "#ECEFF4"
1940
- }
1941
- }
1942
- }]
1943
- }],
1944
- "lang": "typescript"
1945
- },
1946
- "annotations": []
1947
- }]
1948
- }, {
1949
- "northPanel": {
1950
- "tabs": ["./src/index.ts"],
1951
- "active": "./src/index.ts",
1952
- "heightRatio": 1
1953
- },
1954
- "files": [{
1955
- "name": "./src/index.ts",
1956
- "focus": "",
1957
- "code": {
1958
- "lines": [{
1959
- "tokens": [{
1960
- "content": "export",
1961
- "props": {
1962
- "style": {
1963
- "color": "#81A1C1"
1964
- }
1965
- }
1966
- }, {
1967
- "content": " ",
1968
- "props": {
1969
- "style": {
1970
- "color": "#D8DEE9FF"
1971
- }
1972
- }
1973
- }, {
1974
- "content": "default",
1975
- "props": {
1976
- "style": {
1977
- "color": "#81A1C1"
1978
- }
1979
- }
1980
- }, {
1981
- "content": " ",
1982
- "props": {
1983
- "style": {
1984
- "color": "#D8DEE9FF"
1985
- }
1986
- }
1987
- }, {
1988
- "content": "function",
1989
- "props": {
1990
- "style": {
1991
- "color": "#81A1C1"
1992
- }
1993
- }
1994
- }, {
1995
- "content": " ",
1996
- "props": {
1997
- "style": {
1998
- "color": "#D8DEE9FF"
1999
- }
2000
- }
2001
- }, {
2002
- "content": "()",
2003
- "props": {
2004
- "style": {
2005
- "color": "#ECEFF4"
2006
- }
2007
- }
2008
- }, {
2009
- "content": " ",
2010
- "props": {
2011
- "style": {
2012
- "color": "#D8DEE9FF"
2013
- }
2014
- }
2015
- }, {
2016
- "content": "{",
2017
- "props": {
2018
- "style": {
2019
- "color": "#ECEFF4"
2020
- }
2021
- }
2022
- }]
2023
- }, {
2024
- "tokens": [{
2025
- "content": " ",
2026
- "props": {
2027
- "style": {
2028
- "color": "#D8DEE9FF"
2029
- }
2030
- }
2031
- }, {
2032
- "content": "return",
2033
- "props": {
2034
- "style": {
2035
- "color": "#81A1C1"
2036
- }
2037
- }
2038
- }, {
2039
- "content": " ",
2040
- "props": {
2041
- "style": {
2042
- "color": "#D8DEE9FF"
2043
- }
2044
- }
2045
- }, {
2046
- "content": "'",
2047
- "props": {
2048
- "style": {
2049
- "color": "#ECEFF4"
2050
- }
2051
- }
2052
- }, {
2053
- "content": "hello world",
2054
- "props": {
2055
- "style": {
2056
- "color": "#A3BE8C"
2057
- }
2058
- }
2059
- }, {
2060
- "content": "'",
2061
- "props": {
2062
- "style": {
2063
- "color": "#ECEFF4"
2064
- }
2065
- }
2066
- }, {
2067
- "content": ";",
2068
- "props": {
2069
- "style": {
2070
- "color": "#81A1C1"
2071
- }
2072
- }
2073
- }]
2074
- }, {
2075
- "tokens": [{
2076
- "content": "}",
2077
- "props": {
2078
- "style": {
2079
- "color": "#ECEFF4"
2080
- }
2081
- }
2082
- }]
2083
- }],
2084
- "lang": "typescript"
2085
- },
2086
- "annotations": []
2087
- }],
2088
- "southPanel": undefined
2089
- }, {
2090
- "northPanel": {
2091
- "tabs": ["./src/index.ts", "./tests/index.test.ts"],
2092
- "active": "./tests/index.test.ts",
2093
- "heightRatio": 1
2094
- },
2095
- "files": [{
2096
- "name": "./src/index.ts",
2097
- "focus": "",
2098
- "code": {
2099
- "lines": [{
2100
- "tokens": [{
2101
- "content": "export",
2102
- "props": {
2103
- "style": {
2104
- "color": "#81A1C1"
2105
- }
2106
- }
2107
- }, {
2108
- "content": " ",
2109
- "props": {
2110
- "style": {
2111
- "color": "#D8DEE9FF"
2112
- }
2113
- }
2114
- }, {
2115
- "content": "default",
2116
- "props": {
2117
- "style": {
2118
- "color": "#81A1C1"
2119
- }
2120
- }
2121
- }, {
2122
- "content": " ",
2123
- "props": {
2124
- "style": {
2125
- "color": "#D8DEE9FF"
2126
- }
2127
- }
2128
- }, {
2129
- "content": "function",
2130
- "props": {
2131
- "style": {
2132
- "color": "#81A1C1"
2133
- }
2134
- }
2135
- }, {
2136
- "content": " ",
2137
- "props": {
2138
- "style": {
2139
- "color": "#D8DEE9FF"
2140
- }
2141
- }
2142
- }, {
2143
- "content": "()",
2144
- "props": {
2145
- "style": {
2146
- "color": "#ECEFF4"
2147
- }
2148
- }
2149
- }, {
2150
- "content": " ",
2151
- "props": {
2152
- "style": {
2153
- "color": "#D8DEE9FF"
2154
- }
2155
- }
2156
- }, {
2157
- "content": "{",
2158
- "props": {
2159
- "style": {
2160
- "color": "#ECEFF4"
2161
- }
2162
- }
2163
- }]
2164
- }, {
2165
- "tokens": [{
2166
- "content": " ",
2167
- "props": {
2168
- "style": {
2169
- "color": "#D8DEE9FF"
2170
- }
2171
- }
2172
- }, {
2173
- "content": "return",
2174
- "props": {
2175
- "style": {
2176
- "color": "#81A1C1"
2177
- }
2178
- }
2179
- }, {
2180
- "content": " ",
2181
- "props": {
2182
- "style": {
2183
- "color": "#D8DEE9FF"
2184
- }
2185
- }
2186
- }, {
2187
- "content": "'",
2188
- "props": {
2189
- "style": {
2190
- "color": "#ECEFF4"
2191
- }
2192
- }
2193
- }, {
2194
- "content": "hello world",
2195
- "props": {
2196
- "style": {
2197
- "color": "#A3BE8C"
2198
- }
2199
- }
2200
- }, {
2201
- "content": "'",
2202
- "props": {
2203
- "style": {
2204
- "color": "#ECEFF4"
2205
- }
2206
- }
2207
- }, {
2208
- "content": ";",
2209
- "props": {
2210
- "style": {
2211
- "color": "#81A1C1"
2212
- }
2213
- }
2214
- }]
2215
- }, {
2216
- "tokens": [{
2217
- "content": "}",
2218
- "props": {
2219
- "style": {
2220
- "color": "#ECEFF4"
2221
- }
2222
- }
2223
- }]
2224
- }],
2225
- "lang": "typescript"
2226
- },
2227
- "annotations": []
2228
- }, {
2229
- "name": "./tests/index.test.ts",
2230
- "focus": "",
2231
- "code": {
2232
- "lines": [{
2233
- "tokens": [{
2234
- "content": "import",
2235
- "props": {
2236
- "style": {
2237
- "color": "#81A1C1"
2238
- }
2239
- }
2240
- }, {
2241
- "content": " ",
2242
- "props": {
2243
- "style": {
2244
- "color": "#D8DEE9FF"
2245
- }
2246
- }
2247
- }, {
2248
- "content": "main",
2249
- "props": {
2250
- "style": {
2251
- "color": "#D8DEE9"
2252
- }
2253
- }
2254
- }, {
2255
- "content": " ",
2256
- "props": {
2257
- "style": {
2258
- "color": "#D8DEE9FF"
2259
- }
2260
- }
2261
- }, {
2262
- "content": "from",
2263
- "props": {
2264
- "style": {
2265
- "color": "#81A1C1"
2266
- }
2267
- }
2268
- }, {
2269
- "content": " ",
2270
- "props": {
2271
- "style": {
2272
- "color": "#D8DEE9FF"
2273
- }
2274
- }
2275
- }, {
2276
- "content": "'",
2277
- "props": {
2278
- "style": {
2279
- "color": "#ECEFF4"
2280
- }
2281
- }
2282
- }, {
2283
- "content": "@/index",
2284
- "props": {
2285
- "style": {
2286
- "color": "#A3BE8C"
2287
- }
2288
- }
2289
- }, {
2290
- "content": "'",
2291
- "props": {
2292
- "style": {
2293
- "color": "#ECEFF4"
2294
- }
2295
- }
2296
- }, {
2297
- "content": ";",
2298
- "props": {
2299
- "style": {
2300
- "color": "#81A1C1"
2301
- }
2302
- }
2303
- }]
2304
- }, {
2305
- "tokens": []
2306
- }, {
2307
- "tokens": [{
2308
- "content": "describe",
2309
- "props": {
2310
- "style": {
2311
- "color": "#88C0D0"
2312
- }
2313
- }
2314
- }, {
2315
- "content": "(",
2316
- "props": {
2317
- "style": {
2318
- "color": "#D8DEE9FF"
2319
- }
2320
- }
2321
- }, {
2322
- "content": "'",
2323
- "props": {
2324
- "style": {
2325
- "color": "#ECEFF4"
2326
- }
2327
- }
2328
- }, {
2329
- "content": "默认值 cases",
2330
- "props": {
2331
- "style": {
2332
- "color": "#A3BE8C"
2333
- }
2334
- }
2335
- }, {
2336
- "content": "'",
2337
- "props": {
2338
- "style": {
2339
- "color": "#ECEFF4"
2340
- }
2341
- }
2342
- }, {
2343
- "content": ",",
2344
- "props": {
2345
- "style": {
2346
- "color": "#ECEFF4"
2347
- }
2348
- }
2349
- }, {
2350
- "content": " ",
2351
- "props": {
2352
- "style": {
2353
- "color": "#D8DEE9FF"
2354
- }
2355
- }
2356
- }, {
2357
- "content": "()",
2358
- "props": {
2359
- "style": {
2360
- "color": "#ECEFF4"
2361
- }
2362
- }
2363
- }, {
2364
- "content": " ",
2365
- "props": {
2366
- "style": {
2367
- "color": "#D8DEE9FF"
2368
- }
2369
- }
2370
- }, {
2371
- "content": "=>",
2372
- "props": {
2373
- "style": {
2374
- "color": "#81A1C1"
2375
- }
2376
- }
2377
- }, {
2378
- "content": " ",
2379
- "props": {
2380
- "style": {
2381
- "color": "#D8DEE9FF"
2382
- }
2383
- }
2384
- }, {
2385
- "content": "{",
2386
- "props": {
2387
- "style": {
2388
- "color": "#ECEFF4"
2389
- }
2390
- }
2391
- }]
2392
- }, {
2393
- "tokens": [{
2394
- "content": " ",
2395
- "props": {
2396
- "style": {
2397
- "color": "#D8DEE9FF"
2398
- }
2399
- }
2400
- }, {
2401
- "content": "test",
2402
- "props": {
2403
- "style": {
2404
- "color": "#88C0D0"
2405
- }
2406
- }
2407
- }, {
2408
- "content": "(",
2409
- "props": {
2410
- "style": {
2411
- "color": "#D8DEE9FF"
2412
- }
2413
- }
2414
- }, {
2415
- "content": "'",
2416
- "props": {
2417
- "style": {
2418
- "color": "#ECEFF4"
2419
- }
2420
- }
2421
- }, {
2422
- "content": "Have returns",
2423
- "props": {
2424
- "style": {
2425
- "color": "#A3BE8C"
2426
- }
2427
- }
2428
- }, {
2429
- "content": "'",
2430
- "props": {
2431
- "style": {
2432
- "color": "#ECEFF4"
2433
- }
2434
- }
2435
- }, {
2436
- "content": ",",
2437
- "props": {
2438
- "style": {
2439
- "color": "#ECEFF4"
2440
- }
2441
- }
2442
- }, {
2443
- "content": " ",
2444
- "props": {
2445
- "style": {
2446
- "color": "#D8DEE9FF"
2447
- }
2448
- }
2449
- }, {
2450
- "content": "()",
2451
- "props": {
2452
- "style": {
2453
- "color": "#ECEFF4"
2454
- }
2455
- }
2456
- }, {
2457
- "content": " ",
2458
- "props": {
2459
- "style": {
2460
- "color": "#D8DEE9FF"
2461
- }
2462
- }
2463
- }, {
2464
- "content": "=>",
2465
- "props": {
2466
- "style": {
2467
- "color": "#81A1C1"
2468
- }
2469
- }
2470
- }, {
2471
- "content": " ",
2472
- "props": {
2473
- "style": {
2474
- "color": "#D8DEE9FF"
2475
- }
2476
- }
2477
- }, {
2478
- "content": "{",
2479
- "props": {
2480
- "style": {
2481
- "color": "#ECEFF4"
2482
- }
2483
- }
2484
- }]
2485
- }, {
2486
- "tokens": [{
2487
- "content": " ",
2488
- "props": {
2489
- "style": {
2490
- "color": "#D8DEE9FF"
2491
- }
2492
- }
2493
- }, {
2494
- "content": "const",
2495
- "props": {
2496
- "style": {
2497
- "color": "#81A1C1"
2498
- }
2499
- }
2500
- }, {
2501
- "content": " ",
2502
- "props": {
2503
- "style": {
2504
- "color": "#D8DEE9FF"
2505
- }
2506
- }
2507
- }, {
2508
- "content": "drink",
2509
- "props": {
2510
- "style": {
2511
- "color": "#D8DEE9"
2512
- }
2513
- }
2514
- }, {
2515
- "content": " ",
2516
- "props": {
2517
- "style": {
2518
- "color": "#D8DEE9FF"
2519
- }
2520
- }
2521
- }, {
2522
- "content": "=",
2523
- "props": {
2524
- "style": {
2525
- "color": "#81A1C1"
2526
- }
2527
- }
2528
- }, {
2529
- "content": " ",
2530
- "props": {
2531
- "style": {
2532
- "color": "#D8DEE9FF"
2533
- }
2534
- }
2535
- }, {
2536
- "content": "jest",
2537
- "props": {
2538
- "style": {
2539
- "color": "#D8DEE9"
2540
- }
2541
- }
2542
- }, {
2543
- "content": ".",
2544
- "props": {
2545
- "style": {
2546
- "color": "#ECEFF4"
2547
- }
2548
- }
2549
- }, {
2550
- "content": "fn",
2551
- "props": {
2552
- "style": {
2553
- "color": "#88C0D0"
2554
- }
2555
- }
2556
- }, {
2557
- "content": "(",
2558
- "props": {
2559
- "style": {
2560
- "color": "#D8DEE9FF"
2561
- }
2562
- }
2563
- }, {
2564
- "content": "main",
2565
- "props": {
2566
- "style": {
2567
- "color": "#D8DEE9"
2568
- }
2569
- }
2570
- }, {
2571
- "content": ")",
2572
- "props": {
2573
- "style": {
2574
- "color": "#D8DEE9FF"
2575
- }
2576
- }
2577
- }, {
2578
- "content": ";",
2579
- "props": {
2580
- "style": {
2581
- "color": "#81A1C1"
2582
- }
2583
- }
2584
- }]
2585
- }, {
2586
- "tokens": [{
2587
- "content": " ",
2588
- "props": {
2589
- "style": {
2590
- "color": "#D8DEE9FF"
2591
- }
2592
- }
2593
- }, {
2594
- "content": "drink",
2595
- "props": {
2596
- "style": {
2597
- "color": "#88C0D0"
2598
- }
2599
- }
2600
- }, {
2601
- "content": "()",
2602
- "props": {
2603
- "style": {
2604
- "color": "#D8DEE9FF"
2605
- }
2606
- }
2607
- }, {
2608
- "content": ";",
2609
- "props": {
2610
- "style": {
2611
- "color": "#81A1C1"
2612
- }
2613
- }
2614
- }]
2615
- }, {
2616
- "tokens": [{
2617
- "content": " ",
2618
- "props": {
2619
- "style": {
2620
- "color": "#D8DEE9FF"
2621
- }
2622
- }
2623
- }, {
2624
- "content": "expect",
2625
- "props": {
2626
- "style": {
2627
- "color": "#88C0D0"
2628
- }
2629
- }
2630
- }, {
2631
- "content": "(",
2632
- "props": {
2633
- "style": {
2634
- "color": "#D8DEE9FF"
2635
- }
2636
- }
2637
- }, {
2638
- "content": "drink",
2639
- "props": {
2640
- "style": {
2641
- "color": "#D8DEE9"
2642
- }
2643
- }
2644
- }, {
2645
- "content": ")",
2646
- "props": {
2647
- "style": {
2648
- "color": "#D8DEE9FF"
2649
- }
2650
- }
2651
- }, {
2652
- "content": ".",
2653
- "props": {
2654
- "style": {
2655
- "color": "#ECEFF4"
2656
- }
2657
- }
2658
- }, {
2659
- "content": "toHaveReturned",
2660
- "props": {
2661
- "style": {
2662
- "color": "#88C0D0"
2663
- }
2664
- }
2665
- }, {
2666
- "content": "()",
2667
- "props": {
2668
- "style": {
2669
- "color": "#D8DEE9FF"
2670
- }
2671
- }
2672
- }, {
2673
- "content": ";",
2674
- "props": {
2675
- "style": {
2676
- "color": "#81A1C1"
2677
- }
2678
- }
2679
- }]
2680
- }, {
2681
- "tokens": [{
2682
- "content": " ",
2683
- "props": {
2684
- "style": {
2685
- "color": "#D8DEE9FF"
2686
- }
2687
- }
2688
- }, {
2689
- "content": "}",
2690
- "props": {
2691
- "style": {
2692
- "color": "#ECEFF4"
2693
- }
2694
- }
2695
- }, {
2696
- "content": ")",
2697
- "props": {
2698
- "style": {
2699
- "color": "#D8DEE9FF"
2700
- }
2701
- }
2702
- }, {
2703
- "content": ";",
2704
- "props": {
2705
- "style": {
2706
- "color": "#81A1C1"
2707
- }
2708
- }
2709
- }]
2710
- }, {
2711
- "tokens": [{
2712
- "content": "}",
2713
- "props": {
2714
- "style": {
2715
- "color": "#ECEFF4"
2716
- }
2717
- }
2718
- }, {
2719
- "content": ")",
2720
- "props": {
2721
- "style": {
2722
- "color": "#D8DEE9FF"
2723
- }
2724
- }
2725
- }, {
2726
- "content": ";",
2727
- "props": {
2728
- "style": {
2729
- "color": "#81A1C1"
2730
- }
2731
- }
2732
- }]
2733
- }],
2734
- "lang": "typescript"
2735
- },
2736
- "annotations": []
2737
- }],
2738
- "southPanel": undefined
2739
- }, {
2740
- "northPanel": {
2741
- "tabs": ["./src/index.ts", ""],
2742
- "active": "",
2743
- "heightRatio": 1
2744
- },
2745
- "files": [{
2746
- "name": "./src/index.ts",
2747
- "focus": "",
2748
- "code": {
2749
- "lines": [{
2750
- "tokens": [{
2751
- "content": "export",
2752
- "props": {
2753
- "style": {
2754
- "color": "#81A1C1"
2755
- }
2756
- }
2757
- }, {
2758
- "content": " ",
2759
- "props": {
2760
- "style": {
2761
- "color": "#D8DEE9FF"
2762
- }
2763
- }
2764
- }, {
2765
- "content": "default",
2766
- "props": {
2767
- "style": {
2768
- "color": "#81A1C1"
2769
- }
2770
- }
2771
- }, {
2772
- "content": " ",
2773
- "props": {
2774
- "style": {
2775
- "color": "#D8DEE9FF"
2776
- }
2777
- }
2778
- }, {
2779
- "content": "function",
2780
- "props": {
2781
- "style": {
2782
- "color": "#81A1C1"
2783
- }
2784
- }
2785
- }, {
2786
- "content": " ",
2787
- "props": {
2788
- "style": {
2789
- "color": "#D8DEE9FF"
2790
- }
2791
- }
2792
- }, {
2793
- "content": "()",
2794
- "props": {
2795
- "style": {
2796
- "color": "#ECEFF4"
2797
- }
2798
- }
2799
- }, {
2800
- "content": " ",
2801
- "props": {
2802
- "style": {
2803
- "color": "#D8DEE9FF"
2804
- }
2805
- }
2806
- }, {
2807
- "content": "{",
2808
- "props": {
2809
- "style": {
2810
- "color": "#ECEFF4"
2811
- }
2812
- }
2813
- }]
2814
- }, {
2815
- "tokens": [{
2816
- "content": " ",
2817
- "props": {
2818
- "style": {
2819
- "color": "#D8DEE9FF"
2820
- }
2821
- }
2822
- }, {
2823
- "content": "return",
2824
- "props": {
2825
- "style": {
2826
- "color": "#81A1C1"
2827
- }
2828
- }
2829
- }, {
2830
- "content": " ",
2831
- "props": {
2832
- "style": {
2833
- "color": "#D8DEE9FF"
2834
- }
2835
- }
2836
- }, {
2837
- "content": "'",
2838
- "props": {
2839
- "style": {
2840
- "color": "#ECEFF4"
2841
- }
2842
- }
2843
- }, {
2844
- "content": "hello world",
2845
- "props": {
2846
- "style": {
2847
- "color": "#A3BE8C"
2848
- }
2849
- }
2850
- }, {
2851
- "content": "'",
2852
- "props": {
2853
- "style": {
2854
- "color": "#ECEFF4"
2855
- }
2856
- }
2857
- }, {
2858
- "content": ";",
2859
- "props": {
2860
- "style": {
2861
- "color": "#81A1C1"
2862
- }
2863
- }
2864
- }]
2865
- }, {
2866
- "tokens": [{
2867
- "content": "}",
2868
- "props": {
2869
- "style": {
2870
- "color": "#ECEFF4"
2871
- }
2872
- }
2873
- }]
2874
- }],
2875
- "lang": "typescript"
2876
- },
2877
- "annotations": []
2878
- }, {
2879
- "name": "",
2880
- "focus": "",
2881
- "code": {
2882
- "lines": [{
2883
- "tokens": [{
2884
- "content": "pnpm ",
2885
- "props": {
2886
- "style": {
2887
- "color": "#D8DEE9FF"
2888
- }
2889
- }
2890
- }, {
2891
- "content": "test",
2892
- "props": {
2893
- "style": {
2894
- "color": "#88C0D0"
2895
- }
2896
- }
2897
- }]
2898
- }, {
2899
- "tokens": [{
2900
- "content": "## or",
2901
- "props": {
2902
- "style": {
2903
- "color": "#616E88"
2904
- }
2905
- }
2906
- }]
2907
- }, {
2908
- "tokens": [{
2909
- "content": "yarn ",
2910
- "props": {
2911
- "style": {
2912
- "color": "#D8DEE9FF"
2913
- }
2914
- }
2915
- }, {
2916
- "content": "test",
2917
- "props": {
2918
- "style": {
2919
- "color": "#88C0D0"
2920
- }
2921
- }
2922
- }]
2923
- }, {
2924
- "tokens": [{
2925
- "content": "## or",
2926
- "props": {
2927
- "style": {
2928
- "color": "#616E88"
2929
- }
2930
- }
2931
- }]
2932
- }, {
2933
- "tokens": [{
2934
- "content": "npm run ",
2935
- "props": {
2936
- "style": {
2937
- "color": "#D8DEE9FF"
2938
- }
2939
- }
2940
- }, {
2941
- "content": "test",
2942
- "props": {
2943
- "style": {
2944
- "color": "#88C0D0"
2945
- }
2946
- }
2947
- }]
2948
- }],
2949
- "lang": "bash"
2950
- },
2951
- "annotations": []
2952
- }],
2953
- "southPanel": undefined
2954
- }],
2955
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
2956
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})
2957
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
2958
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
2959
- children: "首先是模块的代码。"
2960
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})]
2961
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
2962
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
2963
- children: "然后在测试文件中,我们可以这样。"
2964
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
2965
- children: ["其中 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
2966
- children: "@"
2967
- }), " 指向了源码目录,在初始化项目的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
2968
- children: "tests/tsconfig.json"
2969
- }), " 的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
2970
- children: "paths"
2971
- }), " 中定义了。"]
2972
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})]
2973
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
2974
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
2975
- children: ["最后我们可以执行 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
2976
- children: "modern test"
2977
- }), "。"]
2978
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})]
2979
- })]
2980
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h3, {
2981
- id: "组件",
2982
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
2983
- className: "header-anchor",
2984
- "aria-hidden": "true",
2985
- href: "#组件",
2986
- children: "#"
2987
- }), "组件"]
2988
- }), "\n", "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
2989
- children: ["对于组件,Modern.js 的 Runtime API 提供了用于测试 UI 组件的功能,其功能由 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
2990
- children: "@modern-js/runtime/testing"
2991
- }), " 提供。"]
2992
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.div, {
2993
- className: "modern-directive tip",
2994
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
2995
- className: "modern-directive-title",
2996
- children: "TIP"
2997
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
2998
- className: "modern-directive-content",
2999
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
3000
- children: ["\n如果需要使用 Runtime API,那么可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
3001
- href: "/module-tools/guide/basic/command-preview.html",
3002
- children: "微生成器"
3003
- }), "开启。"]
3004
- })
3005
- })]
3006
- }), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(CH.Spotlight, {
3007
- codeConfig: chCodeConfig,
3008
- editorSteps: [{
3009
- "northPanel": {
3010
- "tabs": ["./src/index.tsx"],
3011
- "active": "./src/index.tsx",
3012
- "heightRatio": 1
3013
- },
3014
- "files": [{
3015
- "name": "./src/index.tsx",
3016
- "focus": "",
3017
- "code": {
3018
- "lines": [{
3019
- "tokens": [{
3020
- "content": "export",
3021
- "props": {
3022
- "style": {
3023
- "color": "#81A1C1"
3024
- }
3025
- }
3026
- }, {
3027
- "content": " ",
3028
- "props": {
3029
- "style": {
3030
- "color": "#D8DEE9FF"
3031
- }
3032
- }
3033
- }, {
3034
- "content": "const",
3035
- "props": {
3036
- "style": {
3037
- "color": "#81A1C1"
3038
- }
3039
- }
3040
- }, {
3041
- "content": " ",
3042
- "props": {
3043
- "style": {
3044
- "color": "#D8DEE9FF"
3045
- }
3046
- }
3047
- }, {
3048
- "content": "default",
3049
- "props": {
3050
- "style": {
3051
- "color": "#D8DEE9"
3052
- }
3053
- }
3054
- }, {
3055
- "content": " () {",
3056
- "props": {
3057
- "style": {
3058
- "color": "#D8DEE9FF"
3059
- }
3060
- }
3061
- }]
3062
- }, {
3063
- "tokens": [{
3064
- "content": " ",
3065
- "props": {
3066
- "style": {
3067
- "color": "#D8DEE9FF"
3068
- }
3069
- }
3070
- }, {
3071
- "content": "return",
3072
- "props": {
3073
- "style": {
3074
- "color": "#81A1C1"
3075
- }
3076
- }
3077
- }, {
3078
- "content": " (",
3079
- "props": {
3080
- "style": {
3081
- "color": "#D8DEE9FF"
3082
- }
3083
- }
3084
- }]
3085
- }, {
3086
- "tokens": [{
3087
- "content": " ",
3088
- "props": {
3089
- "style": {
3090
- "color": "#D8DEE9FF"
3091
- }
3092
- }
3093
- }, {
3094
- "content": "<div>",
3095
- "props": {
3096
- "style": {
3097
- "color": "#81A1C1"
3098
- }
3099
- }
3100
- }, {
3101
- "content": "This is a UI Component",
3102
- "props": {
3103
- "style": {
3104
- "color": "#D8DEE9FF"
3105
- }
3106
- }
3107
- }, {
3108
- "content": "</div>",
3109
- "props": {
3110
- "style": {
3111
- "color": "#81A1C1"
3112
- }
3113
- }
3114
- }]
3115
- }, {
3116
- "tokens": [{
3117
- "content": " )",
3118
- "props": {
3119
- "style": {
3120
- "color": "#D8DEE9FF"
3121
- }
3122
- }
3123
- }, {
3124
- "content": ";",
3125
- "props": {
3126
- "style": {
3127
- "color": "#81A1C1"
3128
- }
3129
- }
3130
- }]
3131
- }, {
3132
- "tokens": [{
3133
- "content": "}",
3134
- "props": {
3135
- "style": {
3136
- "color": "#D8DEE9FF"
3137
- }
3138
- }
3139
- }]
3140
- }],
3141
- "lang": "tsx"
3142
- },
3143
- "annotations": []
3144
- }]
3145
- }, {
3146
- "northPanel": {
3147
- "tabs": ["./src/index.tsx"],
3148
- "active": "./src/index.tsx",
3149
- "heightRatio": 1
3150
- },
3151
- "files": [{
3152
- "name": "./src/index.tsx",
3153
- "focus": "",
3154
- "code": {
3155
- "lines": [{
3156
- "tokens": [{
3157
- "content": "export",
3158
- "props": {
3159
- "style": {
3160
- "color": "#81A1C1"
3161
- }
3162
- }
3163
- }, {
3164
- "content": " ",
3165
- "props": {
3166
- "style": {
3167
- "color": "#D8DEE9FF"
3168
- }
3169
- }
3170
- }, {
3171
- "content": "const",
3172
- "props": {
3173
- "style": {
3174
- "color": "#81A1C1"
3175
- }
3176
- }
3177
- }, {
3178
- "content": " ",
3179
- "props": {
3180
- "style": {
3181
- "color": "#D8DEE9FF"
3182
- }
3183
- }
3184
- }, {
3185
- "content": "default",
3186
- "props": {
3187
- "style": {
3188
- "color": "#D8DEE9"
3189
- }
3190
- }
3191
- }, {
3192
- "content": " () {",
3193
- "props": {
3194
- "style": {
3195
- "color": "#D8DEE9FF"
3196
- }
3197
- }
3198
- }]
3199
- }, {
3200
- "tokens": [{
3201
- "content": " ",
3202
- "props": {
3203
- "style": {
3204
- "color": "#D8DEE9FF"
3205
- }
3206
- }
3207
- }, {
3208
- "content": "return",
3209
- "props": {
3210
- "style": {
3211
- "color": "#81A1C1"
3212
- }
3213
- }
3214
- }, {
3215
- "content": " (",
3216
- "props": {
3217
- "style": {
3218
- "color": "#D8DEE9FF"
3219
- }
3220
- }
3221
- }]
3222
- }, {
3223
- "tokens": [{
3224
- "content": " ",
3225
- "props": {
3226
- "style": {
3227
- "color": "#D8DEE9FF"
3228
- }
3229
- }
3230
- }, {
3231
- "content": "<div>",
3232
- "props": {
3233
- "style": {
3234
- "color": "#81A1C1"
3235
- }
3236
- }
3237
- }, {
3238
- "content": "This is a UI Component",
3239
- "props": {
3240
- "style": {
3241
- "color": "#D8DEE9FF"
3242
- }
3243
- }
3244
- }, {
3245
- "content": "</div>",
3246
- "props": {
3247
- "style": {
3248
- "color": "#81A1C1"
3249
- }
3250
- }
3251
- }]
3252
- }, {
3253
- "tokens": [{
3254
- "content": " )",
3255
- "props": {
3256
- "style": {
3257
- "color": "#D8DEE9FF"
3258
- }
3259
- }
3260
- }, {
3261
- "content": ";",
3262
- "props": {
3263
- "style": {
3264
- "color": "#81A1C1"
3265
- }
3266
- }
3267
- }]
3268
- }, {
3269
- "tokens": [{
3270
- "content": "}",
3271
- "props": {
3272
- "style": {
3273
- "color": "#D8DEE9FF"
3274
- }
3275
- }
3276
- }]
3277
- }],
3278
- "lang": "tsx"
3279
- },
3280
- "annotations": []
3281
- }],
3282
- "southPanel": undefined
3283
- }, {
3284
- "northPanel": {
3285
- "tabs": ["./src/index.tsx", "./tests/index.test.tsx"],
3286
- "active": "./tests/index.test.tsx",
3287
- "heightRatio": 1
3288
- },
3289
- "files": [{
3290
- "name": "./src/index.tsx",
3291
- "focus": "",
3292
- "code": {
3293
- "lines": [{
3294
- "tokens": [{
3295
- "content": "export",
3296
- "props": {
3297
- "style": {
3298
- "color": "#81A1C1"
3299
- }
3300
- }
3301
- }, {
3302
- "content": " ",
3303
- "props": {
3304
- "style": {
3305
- "color": "#D8DEE9FF"
3306
- }
3307
- }
3308
- }, {
3309
- "content": "const",
3310
- "props": {
3311
- "style": {
3312
- "color": "#81A1C1"
3313
- }
3314
- }
3315
- }, {
3316
- "content": " ",
3317
- "props": {
3318
- "style": {
3319
- "color": "#D8DEE9FF"
3320
- }
3321
- }
3322
- }, {
3323
- "content": "default",
3324
- "props": {
3325
- "style": {
3326
- "color": "#D8DEE9"
3327
- }
3328
- }
3329
- }, {
3330
- "content": " () {",
3331
- "props": {
3332
- "style": {
3333
- "color": "#D8DEE9FF"
3334
- }
3335
- }
3336
- }]
3337
- }, {
3338
- "tokens": [{
3339
- "content": " ",
3340
- "props": {
3341
- "style": {
3342
- "color": "#D8DEE9FF"
3343
- }
3344
- }
3345
- }, {
3346
- "content": "return",
3347
- "props": {
3348
- "style": {
3349
- "color": "#81A1C1"
3350
- }
3351
- }
3352
- }, {
3353
- "content": " (",
3354
- "props": {
3355
- "style": {
3356
- "color": "#D8DEE9FF"
3357
- }
3358
- }
3359
- }]
3360
- }, {
3361
- "tokens": [{
3362
- "content": " ",
3363
- "props": {
3364
- "style": {
3365
- "color": "#D8DEE9FF"
3366
- }
3367
- }
3368
- }, {
3369
- "content": "<div>",
3370
- "props": {
3371
- "style": {
3372
- "color": "#81A1C1"
3373
- }
3374
- }
3375
- }, {
3376
- "content": "This is a UI Component",
3377
- "props": {
3378
- "style": {
3379
- "color": "#D8DEE9FF"
3380
- }
3381
- }
3382
- }, {
3383
- "content": "</div>",
3384
- "props": {
3385
- "style": {
3386
- "color": "#81A1C1"
3387
- }
3388
- }
3389
- }]
3390
- }, {
3391
- "tokens": [{
3392
- "content": " )",
3393
- "props": {
3394
- "style": {
3395
- "color": "#D8DEE9FF"
3396
- }
3397
- }
3398
- }, {
3399
- "content": ";",
3400
- "props": {
3401
- "style": {
3402
- "color": "#81A1C1"
3403
- }
3404
- }
3405
- }]
3406
- }, {
3407
- "tokens": [{
3408
- "content": "}",
3409
- "props": {
3410
- "style": {
3411
- "color": "#D8DEE9FF"
3412
- }
3413
- }
3414
- }]
3415
- }],
3416
- "lang": "tsx"
3417
- },
3418
- "annotations": []
3419
- }, {
3420
- "name": "./tests/index.test.tsx",
3421
- "focus": "",
3422
- "code": {
3423
- "lines": [{
3424
- "tokens": [{
3425
- "content": "import",
3426
- "props": {
3427
- "style": {
3428
- "color": "#81A1C1"
3429
- }
3430
- }
3431
- }, {
3432
- "content": " ",
3433
- "props": {
3434
- "style": {
3435
- "color": "#D8DEE9FF"
3436
- }
3437
- }
3438
- }, {
3439
- "content": "{",
3440
- "props": {
3441
- "style": {
3442
- "color": "#ECEFF4"
3443
- }
3444
- }
3445
- }, {
3446
- "content": " ",
3447
- "props": {
3448
- "style": {
3449
- "color": "#D8DEE9FF"
3450
- }
3451
- }
3452
- }, {
3453
- "content": "render",
3454
- "props": {
3455
- "style": {
3456
- "color": "#D8DEE9"
3457
- }
3458
- }
3459
- }, {
3460
- "content": ",",
3461
- "props": {
3462
- "style": {
3463
- "color": "#ECEFF4"
3464
- }
3465
- }
3466
- }, {
3467
- "content": " ",
3468
- "props": {
3469
- "style": {
3470
- "color": "#D8DEE9FF"
3471
- }
3472
- }
3473
- }, {
3474
- "content": "screen",
3475
- "props": {
3476
- "style": {
3477
- "color": "#D8DEE9"
3478
- }
3479
- }
3480
- }, {
3481
- "content": " ",
3482
- "props": {
3483
- "style": {
3484
- "color": "#D8DEE9FF"
3485
- }
3486
- }
3487
- }, {
3488
- "content": "}",
3489
- "props": {
3490
- "style": {
3491
- "color": "#ECEFF4"
3492
- }
3493
- }
3494
- }, {
3495
- "content": " ",
3496
- "props": {
3497
- "style": {
3498
- "color": "#D8DEE9FF"
3499
- }
3500
- }
3501
- }, {
3502
- "content": "from",
3503
- "props": {
3504
- "style": {
3505
- "color": "#81A1C1"
3506
- }
3507
- }
3508
- }, {
3509
- "content": " ",
3510
- "props": {
3511
- "style": {
3512
- "color": "#D8DEE9FF"
3513
- }
3514
- }
3515
- }, {
3516
- "content": "'",
3517
- "props": {
3518
- "style": {
3519
- "color": "#ECEFF4"
3520
- }
3521
- }
3522
- }, {
3523
- "content": "@modern-js/runtime/testing",
3524
- "props": {
3525
- "style": {
3526
- "color": "#A3BE8C"
3527
- }
3528
- }
3529
- }, {
3530
- "content": "'",
3531
- "props": {
3532
- "style": {
3533
- "color": "#ECEFF4"
3534
- }
3535
- }
3536
- }, {
3537
- "content": ";",
3538
- "props": {
3539
- "style": {
3540
- "color": "#81A1C1"
3541
- }
3542
- }
3543
- }]
3544
- }, {
3545
- "tokens": []
3546
- }, {
3547
- "tokens": [{
3548
- "content": "import",
3549
- "props": {
3550
- "style": {
3551
- "color": "#81A1C1"
3552
- }
3553
- }
3554
- }, {
3555
- "content": " ",
3556
- "props": {
3557
- "style": {
3558
- "color": "#D8DEE9FF"
3559
- }
3560
- }
3561
- }, {
3562
- "content": "Component",
3563
- "props": {
3564
- "style": {
3565
- "color": "#D8DEE9"
3566
- }
3567
- }
3568
- }, {
3569
- "content": " ",
3570
- "props": {
3571
- "style": {
3572
- "color": "#D8DEE9FF"
3573
- }
3574
- }
3575
- }, {
3576
- "content": "from",
3577
- "props": {
3578
- "style": {
3579
- "color": "#81A1C1"
3580
- }
3581
- }
3582
- }, {
3583
- "content": " ",
3584
- "props": {
3585
- "style": {
3586
- "color": "#D8DEE9FF"
3587
- }
3588
- }
3589
- }, {
3590
- "content": "'",
3591
- "props": {
3592
- "style": {
3593
- "color": "#ECEFF4"
3594
- }
3595
- }
3596
- }, {
3597
- "content": "@/index",
3598
- "props": {
3599
- "style": {
3600
- "color": "#A3BE8C"
3601
- }
3602
- }
3603
- }, {
3604
- "content": "'",
3605
- "props": {
3606
- "style": {
3607
- "color": "#ECEFF4"
3608
- }
3609
- }
3610
- }, {
3611
- "content": ";",
3612
- "props": {
3613
- "style": {
3614
- "color": "#81A1C1"
3615
- }
3616
- }
3617
- }]
3618
- }, {
3619
- "tokens": []
3620
- }, {
3621
- "tokens": [{
3622
- "content": "describe",
3623
- "props": {
3624
- "style": {
3625
- "color": "#88C0D0"
3626
- }
3627
- }
3628
- }, {
3629
- "content": "(",
3630
- "props": {
3631
- "style": {
3632
- "color": "#D8DEE9FF"
3633
- }
3634
- }
3635
- }, {
3636
- "content": "'",
3637
- "props": {
3638
- "style": {
3639
- "color": "#ECEFF4"
3640
- }
3641
- }
3642
- }, {
3643
- "content": "默认值 cases",
3644
- "props": {
3645
- "style": {
3646
- "color": "#A3BE8C"
3647
- }
3648
- }
3649
- }, {
3650
- "content": "'",
3651
- "props": {
3652
- "style": {
3653
- "color": "#ECEFF4"
3654
- }
3655
- }
3656
- }, {
3657
- "content": ",",
3658
- "props": {
3659
- "style": {
3660
- "color": "#ECEFF4"
3661
- }
3662
- }
3663
- }, {
3664
- "content": " ",
3665
- "props": {
3666
- "style": {
3667
- "color": "#D8DEE9FF"
3668
- }
3669
- }
3670
- }, {
3671
- "content": "()",
3672
- "props": {
3673
- "style": {
3674
- "color": "#ECEFF4"
3675
- }
3676
- }
3677
- }, {
3678
- "content": " ",
3679
- "props": {
3680
- "style": {
3681
- "color": "#D8DEE9FF"
3682
- }
3683
- }
3684
- }, {
3685
- "content": "=>",
3686
- "props": {
3687
- "style": {
3688
- "color": "#81A1C1"
3689
- }
3690
- }
3691
- }, {
3692
- "content": " ",
3693
- "props": {
3694
- "style": {
3695
- "color": "#D8DEE9FF"
3696
- }
3697
- }
3698
- }, {
3699
- "content": "{",
3700
- "props": {
3701
- "style": {
3702
- "color": "#ECEFF4"
3703
- }
3704
- }
3705
- }]
3706
- }, {
3707
- "tokens": [{
3708
- "content": " ",
3709
- "props": {
3710
- "style": {
3711
- "color": "#D8DEE9FF"
3712
- }
3713
- }
3714
- }, {
3715
- "content": "test",
3716
- "props": {
3717
- "style": {
3718
- "color": "#88C0D0"
3719
- }
3720
- }
3721
- }, {
3722
- "content": "(",
3723
- "props": {
3724
- "style": {
3725
- "color": "#D8DEE9FF"
3726
- }
3727
- }
3728
- }, {
3729
- "content": "'",
3730
- "props": {
3731
- "style": {
3732
- "color": "#ECEFF4"
3733
- }
3734
- }
3735
- }, {
3736
- "content": "Rendered",
3737
- "props": {
3738
- "style": {
3739
- "color": "#A3BE8C"
3740
- }
3741
- }
3742
- }, {
3743
- "content": "'",
3744
- "props": {
3745
- "style": {
3746
- "color": "#ECEFF4"
3747
- }
3748
- }
3749
- }, {
3750
- "content": ",",
3751
- "props": {
3752
- "style": {
3753
- "color": "#ECEFF4"
3754
- }
3755
- }
3756
- }, {
3757
- "content": " ",
3758
- "props": {
3759
- "style": {
3760
- "color": "#D8DEE9FF"
3761
- }
3762
- }
3763
- }, {
3764
- "content": "()",
3765
- "props": {
3766
- "style": {
3767
- "color": "#ECEFF4"
3768
- }
3769
- }
3770
- }, {
3771
- "content": " ",
3772
- "props": {
3773
- "style": {
3774
- "color": "#D8DEE9FF"
3775
- }
3776
- }
3777
- }, {
3778
- "content": "=>",
3779
- "props": {
3780
- "style": {
3781
- "color": "#81A1C1"
3782
- }
3783
- }
3784
- }, {
3785
- "content": " ",
3786
- "props": {
3787
- "style": {
3788
- "color": "#D8DEE9FF"
3789
- }
3790
- }
3791
- }, {
3792
- "content": "{",
3793
- "props": {
3794
- "style": {
3795
- "color": "#ECEFF4"
3796
- }
3797
- }
3798
- }]
3799
- }, {
3800
- "tokens": [{
3801
- "content": " ",
3802
- "props": {
3803
- "style": {
3804
- "color": "#D8DEE9FF"
3805
- }
3806
- }
3807
- }, {
3808
- "content": "render",
3809
- "props": {
3810
- "style": {
3811
- "color": "#88C0D0"
3812
- }
3813
- }
3814
- }, {
3815
- "content": "(",
3816
- "props": {
3817
- "style": {
3818
- "color": "#D8DEE9FF"
3819
- }
3820
- }
3821
- }, {
3822
- "content": "<",
3823
- "props": {
3824
- "style": {
3825
- "color": "#81A1C1"
3826
- }
3827
- }
3828
- }, {
3829
- "content": "Component",
3830
- "props": {
3831
- "style": {
3832
- "color": "#8FBCBB"
3833
- }
3834
- }
3835
- }, {
3836
- "content": " ",
3837
- "props": {
3838
- "style": {
3839
- "color": "#D8DEE9FF"
3840
- }
3841
- }
3842
- }, {
3843
- "content": "/>",
3844
- "props": {
3845
- "style": {
3846
- "color": "#81A1C1"
3847
- }
3848
- }
3849
- }, {
3850
- "content": ")",
3851
- "props": {
3852
- "style": {
3853
- "color": "#D8DEE9FF"
3854
- }
3855
- }
3856
- }, {
3857
- "content": ";",
3858
- "props": {
3859
- "style": {
3860
- "color": "#81A1C1"
3861
- }
3862
- }
3863
- }]
3864
- }, {
3865
- "tokens": [{
3866
- "content": " ",
3867
- "props": {
3868
- "style": {
3869
- "color": "#D8DEE9FF"
3870
- }
3871
- }
3872
- }, {
3873
- "content": "expect",
3874
- "props": {
3875
- "style": {
3876
- "color": "#88C0D0"
3877
- }
3878
- }
3879
- }, {
3880
- "content": "(",
3881
- "props": {
3882
- "style": {
3883
- "color": "#D8DEE9FF"
3884
- }
3885
- }
3886
- }, {
3887
- "content": "screen",
3888
- "props": {
3889
- "style": {
3890
- "color": "#D8DEE9"
3891
- }
3892
- }
3893
- }, {
3894
- "content": ".",
3895
- "props": {
3896
- "style": {
3897
- "color": "#ECEFF4"
3898
- }
3899
- }
3900
- }, {
3901
- "content": "getByText",
3902
- "props": {
3903
- "style": {
3904
- "color": "#88C0D0"
3905
- }
3906
- }
3907
- }, {
3908
- "content": "(",
3909
- "props": {
3910
- "style": {
3911
- "color": "#D8DEE9FF"
3912
- }
3913
- }
3914
- }, {
3915
- "content": "'",
3916
- "props": {
3917
- "style": {
3918
- "color": "#ECEFF4"
3919
- }
3920
- }
3921
- }, {
3922
- "content": "This is a UI Component",
3923
- "props": {
3924
- "style": {
3925
- "color": "#A3BE8C"
3926
- }
3927
- }
3928
- }, {
3929
- "content": "'",
3930
- "props": {
3931
- "style": {
3932
- "color": "#ECEFF4"
3933
- }
3934
- }
3935
- }, {
3936
- "content": "))",
3937
- "props": {
3938
- "style": {
3939
- "color": "#D8DEE9FF"
3940
- }
3941
- }
3942
- }, {
3943
- "content": ".",
3944
- "props": {
3945
- "style": {
3946
- "color": "#ECEFF4"
3947
- }
3948
- }
3949
- }, {
3950
- "content": "toBeInTheDocument",
3951
- "props": {
3952
- "style": {
3953
- "color": "#88C0D0"
3954
- }
3955
- }
3956
- }, {
3957
- "content": "()",
3958
- "props": {
3959
- "style": {
3960
- "color": "#D8DEE9FF"
3961
- }
3962
- }
3963
- }, {
3964
- "content": ";",
3965
- "props": {
3966
- "style": {
3967
- "color": "#81A1C1"
3968
- }
3969
- }
3970
- }]
3971
- }, {
3972
- "tokens": [{
3973
- "content": " ",
3974
- "props": {
3975
- "style": {
3976
- "color": "#D8DEE9FF"
3977
- }
3978
- }
3979
- }, {
3980
- "content": "}",
3981
- "props": {
3982
- "style": {
3983
- "color": "#ECEFF4"
3984
- }
3985
- }
3986
- }, {
3987
- "content": ")",
3988
- "props": {
3989
- "style": {
3990
- "color": "#D8DEE9FF"
3991
- }
3992
- }
3993
- }, {
3994
- "content": ";",
3995
- "props": {
3996
- "style": {
3997
- "color": "#81A1C1"
3998
- }
3999
- }
4000
- }]
4001
- }, {
4002
- "tokens": [{
4003
- "content": "}",
4004
- "props": {
4005
- "style": {
4006
- "color": "#ECEFF4"
4007
- }
4008
- }
4009
- }, {
4010
- "content": ")",
4011
- "props": {
4012
- "style": {
4013
- "color": "#D8DEE9FF"
4014
- }
4015
- }
4016
- }, {
4017
- "content": ";",
4018
- "props": {
4019
- "style": {
4020
- "color": "#81A1C1"
4021
- }
4022
- }
4023
- }]
4024
- }],
4025
- "lang": "tsx"
4026
- },
4027
- "annotations": []
4028
- }],
4029
- "southPanel": undefined
4030
- }, {
4031
- "northPanel": {
4032
- "tabs": ["./src/index.tsx", ""],
4033
- "active": "",
4034
- "heightRatio": 1
4035
- },
4036
- "files": [{
4037
- "name": "./src/index.tsx",
4038
- "focus": "",
4039
- "code": {
4040
- "lines": [{
4041
- "tokens": [{
4042
- "content": "export",
4043
- "props": {
4044
- "style": {
4045
- "color": "#81A1C1"
4046
- }
4047
- }
4048
- }, {
4049
- "content": " ",
4050
- "props": {
4051
- "style": {
4052
- "color": "#D8DEE9FF"
4053
- }
4054
- }
4055
- }, {
4056
- "content": "const",
4057
- "props": {
4058
- "style": {
4059
- "color": "#81A1C1"
4060
- }
4061
- }
4062
- }, {
4063
- "content": " ",
4064
- "props": {
4065
- "style": {
4066
- "color": "#D8DEE9FF"
4067
- }
4068
- }
4069
- }, {
4070
- "content": "default",
4071
- "props": {
4072
- "style": {
4073
- "color": "#D8DEE9"
4074
- }
4075
- }
4076
- }, {
4077
- "content": " () {",
4078
- "props": {
4079
- "style": {
4080
- "color": "#D8DEE9FF"
4081
- }
4082
- }
4083
- }]
4084
- }, {
4085
- "tokens": [{
4086
- "content": " ",
4087
- "props": {
4088
- "style": {
4089
- "color": "#D8DEE9FF"
4090
- }
4091
- }
4092
- }, {
4093
- "content": "return",
4094
- "props": {
4095
- "style": {
4096
- "color": "#81A1C1"
4097
- }
4098
- }
4099
- }, {
4100
- "content": " (",
4101
- "props": {
4102
- "style": {
4103
- "color": "#D8DEE9FF"
4104
- }
4105
- }
4106
- }]
4107
- }, {
4108
- "tokens": [{
4109
- "content": " ",
4110
- "props": {
4111
- "style": {
4112
- "color": "#D8DEE9FF"
4113
- }
4114
- }
4115
- }, {
4116
- "content": "<div>",
4117
- "props": {
4118
- "style": {
4119
- "color": "#81A1C1"
4120
- }
4121
- }
4122
- }, {
4123
- "content": "This is a UI Component",
4124
- "props": {
4125
- "style": {
4126
- "color": "#D8DEE9FF"
4127
- }
4128
- }
4129
- }, {
4130
- "content": "</div>",
4131
- "props": {
4132
- "style": {
4133
- "color": "#81A1C1"
4134
- }
4135
- }
4136
- }]
4137
- }, {
4138
- "tokens": [{
4139
- "content": " )",
4140
- "props": {
4141
- "style": {
4142
- "color": "#D8DEE9FF"
4143
- }
4144
- }
4145
- }, {
4146
- "content": ";",
4147
- "props": {
4148
- "style": {
4149
- "color": "#81A1C1"
4150
- }
4151
- }
4152
- }]
4153
- }, {
4154
- "tokens": [{
4155
- "content": "}",
4156
- "props": {
4157
- "style": {
4158
- "color": "#D8DEE9FF"
4159
- }
4160
- }
4161
- }]
4162
- }],
4163
- "lang": "tsx"
4164
- },
4165
- "annotations": []
4166
- }, {
4167
- "name": "",
4168
- "focus": "",
4169
- "code": {
4170
- "lines": [{
4171
- "tokens": [{
4172
- "content": "pnpm ",
4173
- "props": {
4174
- "style": {
4175
- "color": "#D8DEE9FF"
4176
- }
4177
- }
4178
- }, {
4179
- "content": "test",
4180
- "props": {
4181
- "style": {
4182
- "color": "#88C0D0"
4183
- }
4184
- }
4185
- }]
4186
- }, {
4187
- "tokens": [{
4188
- "content": "## or",
4189
- "props": {
4190
- "style": {
4191
- "color": "#616E88"
4192
- }
4193
- }
4194
- }]
4195
- }, {
4196
- "tokens": [{
4197
- "content": "yarn ",
4198
- "props": {
4199
- "style": {
4200
- "color": "#D8DEE9FF"
4201
- }
4202
- }
4203
- }, {
4204
- "content": "test",
4205
- "props": {
4206
- "style": {
4207
- "color": "#88C0D0"
4208
- }
4209
- }
4210
- }]
4211
- }, {
4212
- "tokens": [{
4213
- "content": "## or",
4214
- "props": {
4215
- "style": {
4216
- "color": "#616E88"
4217
- }
4218
- }
4219
- }]
4220
- }, {
4221
- "tokens": [{
4222
- "content": "npm run ",
4223
- "props": {
4224
- "style": {
4225
- "color": "#D8DEE9FF"
4226
- }
4227
- }
4228
- }, {
4229
- "content": "test",
4230
- "props": {
4231
- "style": {
4232
- "color": "#88C0D0"
4233
- }
4234
- }
4235
- }]
4236
- }],
4237
- "lang": "bash"
4238
- },
4239
- "annotations": []
4240
- }],
4241
- "southPanel": undefined
4242
- }],
4243
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
4244
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})
4245
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
4246
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
4247
- children: "首先是组件的代码。"
4248
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})]
4249
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
4250
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
4251
- children: "然后在测试文件中,我们可以这样。"
4252
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
4253
- children: ["其中 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
4254
- children: "@"
4255
- }), " 指向了源码目录,在初始化项目的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
4256
- children: "tests/tsconfig.json"
4257
- }), " 的 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
4258
- children: "paths"
4259
- }), " 中定义了。"]
4260
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})]
4261
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
4262
- children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
4263
- children: ["最后我们可以执行 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
4264
- children: "modern test"
4265
- }), "。"]
4266
- }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.CodeSlot, {})]
4267
- })]
4268
- })]
4269
- });
4270
- }
4271
- function MDXContent(props = {}) {
4272
- const {wrapper: MDXLayout} = props.components || ({});
4273
- return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
4274
- children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
4275
- })) : _createMdxContent(props);
4276
- }
4277
- /* harmony default export */ __webpack_exports__["default"] = (MDXContent);
4278
- function _missingMdxReference(id, component, place) {
4279
- throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/bytedance/github/targeral/modern-dev/website/module-tools/docs/zh/guide/basic/test-your-project.mdx`" : ""));
4280
- }
4281
-
4282
-
4283
- /***/ })
4284
-
4285
- }]);
4286
- //# sourceMappingURL=zh_guide_basic_test-your-project.js.map