@rstest/browser 0.8.2 → 0.8.3
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.
- package/dist/index.js +3 -2
- package/package.json +5 -5
- package/src/hostController.ts +7 -2
package/dist/index.js
CHANGED
|
@@ -1917,6 +1917,7 @@ const htmlTemplate = `<!DOCTYPE html>
|
|
|
1917
1917
|
</body>
|
|
1918
1918
|
</html>
|
|
1919
1919
|
`;
|
|
1920
|
+
const VIRTUAL_MANIFEST_FILENAME = 'virtual-manifest.ts';
|
|
1920
1921
|
const destroyBrowserRuntime = async (runtime)=>{
|
|
1921
1922
|
try {
|
|
1922
1923
|
await runtime.browser?.close?.();
|
|
@@ -2276,7 +2277,7 @@ const runBrowserController = async (context, options)=>{
|
|
|
2276
2277
|
}
|
|
2277
2278
|
const isWatchMode = 'watch' === context.command;
|
|
2278
2279
|
const tempDir = isWatchMode && watchContext.runtime ? watchContext.runtime.tempDir : isWatchMode ? join(context.rootPath, TEMP_RSTEST_OUTPUT_DIR, 'browser', 'watch') : join(context.rootPath, TEMP_RSTEST_OUTPUT_DIR, 'browser', Date.now().toString());
|
|
2279
|
-
const manifestPath = join(tempDir,
|
|
2280
|
+
const manifestPath = join(tempDir, VIRTUAL_MANIFEST_FILENAME);
|
|
2280
2281
|
const manifestSource = generateManifestModule({
|
|
2281
2282
|
manifestPath,
|
|
2282
2283
|
entries: projectEntries
|
|
@@ -2538,7 +2539,7 @@ const listBrowserTests = async (context, options)=>{
|
|
|
2538
2539
|
close: async ()=>{}
|
|
2539
2540
|
};
|
|
2540
2541
|
const tempDir = join(context.rootPath, TEMP_RSTEST_OUTPUT_DIR, 'browser', `list-${Date.now()}`);
|
|
2541
|
-
const manifestPath = join(tempDir,
|
|
2542
|
+
const manifestPath = join(tempDir, VIRTUAL_MANIFEST_FILENAME);
|
|
2542
2543
|
const manifestSource = generateManifestModule({
|
|
2543
2544
|
manifestPath,
|
|
2544
2545
|
entries: projectEntries
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstest/browser",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Browser mode support for Rstest testing framework.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rstest/issues"
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"picocolors": "^1.1.1",
|
|
53
53
|
"picomatch": "^4.0.3",
|
|
54
54
|
"playwright": "^1.49.1",
|
|
55
|
-
"@rstest/
|
|
56
|
-
"@rstest/
|
|
57
|
-
"@rstest/
|
|
55
|
+
"@rstest/browser-ui": "0.0.0",
|
|
56
|
+
"@rstest/core": "0.8.3",
|
|
57
|
+
"@rstest/tsconfig": "0.0.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"playwright": "^1.49.1",
|
|
61
|
-
"@rstest/core": "^0.8.
|
|
61
|
+
"@rstest/core": "^0.8.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
64
64
|
"playwright": {
|
package/src/hostController.ts
CHANGED
|
@@ -716,6 +716,11 @@ const htmlTemplate = `<!DOCTYPE html>
|
|
|
716
716
|
</html>
|
|
717
717
|
`;
|
|
718
718
|
|
|
719
|
+
// Workaround for noisy "removed ..." logs caused by VirtualModulesPlugin.
|
|
720
|
+
// Rsbuild suppresses the removed-file log if all removed paths include "virtual":
|
|
721
|
+
// https://github.com/web-infra-dev/rsbuild/blob/1258fa9dba5c321a4629b591a6dadbd2e26c6963/packages/core/src/createCompiler.ts#L73-L76
|
|
722
|
+
const VIRTUAL_MANIFEST_FILENAME = 'virtual-manifest.ts';
|
|
723
|
+
|
|
719
724
|
// ============================================================================
|
|
720
725
|
// Browser Runtime Lifecycle
|
|
721
726
|
// ============================================================================
|
|
@@ -1296,8 +1301,8 @@ export const runBrowserController = async (
|
|
|
1296
1301
|
'browser',
|
|
1297
1302
|
Date.now().toString(),
|
|
1298
1303
|
);
|
|
1299
|
-
const manifestPath = join(tempDir, 'manifest.ts');
|
|
1300
1304
|
|
|
1305
|
+
const manifestPath = join(tempDir, VIRTUAL_MANIFEST_FILENAME);
|
|
1301
1306
|
const manifestSource = generateManifestModule({
|
|
1302
1307
|
manifestPath,
|
|
1303
1308
|
entries: projectEntries,
|
|
@@ -1769,8 +1774,8 @@ export const listBrowserTests = async (
|
|
|
1769
1774
|
'browser',
|
|
1770
1775
|
`list-${Date.now()}`,
|
|
1771
1776
|
);
|
|
1772
|
-
const manifestPath = join(tempDir, 'manifest.ts');
|
|
1773
1777
|
|
|
1778
|
+
const manifestPath = join(tempDir, VIRTUAL_MANIFEST_FILENAME);
|
|
1774
1779
|
const manifestSource = generateManifestModule({
|
|
1775
1780
|
manifestPath,
|
|
1776
1781
|
entries: projectEntries,
|