@rstest/browser 0.9.3 → 0.9.4

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 CHANGED
@@ -2894,9 +2894,8 @@ const resolveProviderForTestPath = ({ testPath, browserProjects })=>{
2894
2894
  throw new Error(`Cannot resolve browser provider for test path: ${JSON.stringify(testPath)}. Known project roots: ${JSON.stringify(sortedProjects.map((p)=>p.rootPath))}`);
2895
2895
  };
2896
2896
  const collectProjectEntries = async (context)=>{
2897
- const projectEntries = [];
2898
2897
  const browserProjects = getBrowserProjects(context);
2899
- for (const project of browserProjects){
2898
+ return Promise.all(browserProjects.map(async (project)=>{
2900
2899
  const { normalizedConfig: { include, exclude, includeSource, setupFiles } } = project;
2901
2900
  const tests = await getTestEntries({
2902
2901
  include,
@@ -2907,13 +2906,12 @@ const collectProjectEntries = async (context)=>{
2907
2906
  fileFilters: context.fileFilters || []
2908
2907
  });
2909
2908
  const setup = getSetupFiles(setupFiles, project.rootPath);
2910
- projectEntries.push({
2909
+ return {
2911
2910
  project,
2912
2911
  setupFiles: Object.values(setup),
2913
2912
  testFiles: Object.values(tests)
2914
- });
2915
- }
2916
- return projectEntries;
2913
+ };
2914
+ }));
2917
2915
  };
2918
2916
  const resolveBrowserFile = (relativePath)=>{
2919
2917
  const candidates = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rstest/browser",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Browser mode support for Rstest testing framework.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/web-infra-dev/rstest/issues"
@@ -58,13 +58,13 @@
58
58
  "picocolors": "^1.1.1",
59
59
  "picomatch": "^4.0.3",
60
60
  "playwright": "^1.58.2",
61
- "@rstest/core": "0.9.3",
62
61
  "@rstest/tsconfig": "0.0.1",
62
+ "@rstest/core": "0.9.4",
63
63
  "@rstest/browser-ui": "0.0.0"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "playwright": "^1.49.1",
67
- "@rstest/core": "^0.9.3"
67
+ "@rstest/core": "^0.9.4"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "playwright": {
@@ -873,35 +873,33 @@ const resolveProviderForTestPath = ({
873
873
  const collectProjectEntries = async (
874
874
  context: Rstest,
875
875
  ): Promise<BrowserProjectEntries[]> => {
876
- const projectEntries: BrowserProjectEntries[] = [];
877
-
878
876
  // Only collect entries for browser mode projects
879
877
  const browserProjects = getBrowserProjects(context);
880
878
 
881
- for (const project of browserProjects) {
882
- const {
883
- normalizedConfig: { include, exclude, includeSource, setupFiles },
884
- } = project;
885
-
886
- const tests = await getTestEntries({
887
- include,
888
- exclude: exclude.patterns,
889
- includeSource,
890
- rootPath: context.rootPath,
891
- projectRoot: project.rootPath,
892
- fileFilters: context.fileFilters || [],
893
- });
894
-
895
- const setup = getSetupFiles(setupFiles, project.rootPath);
879
+ return Promise.all(
880
+ browserProjects.map(async (project) => {
881
+ const {
882
+ normalizedConfig: { include, exclude, includeSource, setupFiles },
883
+ } = project;
884
+
885
+ const tests = await getTestEntries({
886
+ include,
887
+ exclude: exclude.patterns,
888
+ includeSource,
889
+ rootPath: context.rootPath,
890
+ projectRoot: project.rootPath,
891
+ fileFilters: context.fileFilters || [],
892
+ });
896
893
 
897
- projectEntries.push({
898
- project,
899
- setupFiles: Object.values(setup),
900
- testFiles: Object.values(tests),
901
- });
902
- }
894
+ const setup = getSetupFiles(setupFiles, project.rootPath);
903
895
 
904
- return projectEntries;
896
+ return {
897
+ project,
898
+ setupFiles: Object.values(setup),
899
+ testFiles: Object.values(tests),
900
+ };
901
+ }),
902
+ );
905
903
  };
906
904
 
907
905
  const resolveBrowserFile = (relativePath: string): string => {