@rstest/core 0.7.8 → 0.8.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 (56) hide show
  1. package/LICENSE.md +294 -0
  2. package/dist/0~130.js +2 -2
  3. package/dist/0~1472.js +48 -0
  4. package/dist/0~1981.js +3 -0
  5. package/dist/0~2173.js +98 -21
  6. package/dist/0~2255.js +1 -1
  7. package/dist/0~3062.js +0 -5
  8. package/dist/0~3919.js +1 -1
  9. package/dist/0~4403.js +6 -5
  10. package/dist/0~4809.js +4 -3
  11. package/dist/0~5835.js +2 -2
  12. package/dist/0~62.js +1 -1
  13. package/dist/0~6588.js +3 -3
  14. package/dist/0~6923.js +2 -2
  15. package/dist/0~7583.js +8 -7
  16. package/dist/0~7882.js +1145 -0
  17. package/dist/0~8426.js +1 -2
  18. package/dist/0~89.js +26 -23
  19. package/dist/0~9348.js +953 -0
  20. package/dist/0~9634.js +57 -9
  21. package/dist/1157.js +11 -116
  22. package/dist/{7913.js → 1294.js} +51 -1745
  23. package/dist/2672.js +647 -0
  24. package/dist/3278.js +3 -450
  25. package/dist/4484.js +38 -0
  26. package/dist/487.js +1739 -0
  27. package/dist/4899.js +11 -0
  28. package/dist/5734.js +1 -1
  29. package/dist/{0~6151.js → 6151.js} +169 -13
  30. package/dist/{0~6973.js → 6973.js} +4 -4
  31. package/dist/721.js +9 -0
  32. package/dist/9131.js +661 -549
  33. package/dist/browser-runtime/2~907.js +1211 -0
  34. package/dist/browser-runtime/2~907.js.map +1 -0
  35. package/dist/browser-runtime/389.js +22071 -0
  36. package/dist/browser-runtime/389.js.LICENSE.txt +329 -0
  37. package/dist/browser-runtime/389.js.map +1 -0
  38. package/dist/browser-runtime/index.d.ts +2847 -0
  39. package/dist/browser-runtime/index.js +1 -0
  40. package/dist/browser-runtime/rslib-runtime.js +50 -0
  41. package/dist/browser-runtime/rslib-runtime.js.map +1 -0
  42. package/dist/browser.d.ts +3399 -0
  43. package/dist/browser.js +14 -0
  44. package/dist/globalSetupWorker.js +3 -2
  45. package/dist/index.d.ts +115 -5
  46. package/dist/index.js +2 -1
  47. package/dist/rslib-runtime.js +27 -0
  48. package/dist/rstestSuppressWarnings.cjs +9 -0
  49. package/dist/worker.d.ts +102 -5
  50. package/dist/worker.js +415 -1
  51. package/package.json +27 -12
  52. package/dist/0~8957.js +0 -149
  53. package/dist/554.js +0 -417
  54. package/dist/5693.js +0 -91
  55. /package/dist/{7913.js.LICENSE.txt → 1294.js.LICENSE.txt} +0 -0
  56. /package/dist/{0~6151.js.LICENSE.txt → 6151.js.LICENSE.txt} +0 -0
package/LICENSE.md CHANGED
@@ -336,6 +336,34 @@ Licensed under MIT license in the repository at https://github.com/babel/babel.g
336
336
  > OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
337
337
  > WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
338
338
 
339
+ ### @clack/core
340
+
341
+ Licensed under MIT license in the repository at git+https://github.com/bombshell-dev/clack.git.
342
+
343
+ > MIT License
344
+ >
345
+ > Copyright (c) Nate Moore
346
+ >
347
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
348
+ >
349
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
350
+ >
351
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
352
+
353
+ ### @clack/prompts
354
+
355
+ Licensed under MIT license in the repository at git+https://github.com/bombshell-dev/clack.git.
356
+
357
+ > MIT License
358
+ >
359
+ > Copyright (c) Nate Moore
360
+ >
361
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
362
+ >
363
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
364
+ >
365
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
366
+
339
367
  ### @jest/diff-sequences
340
368
 
341
369
  Licensed under MIT license in the repository at https://github.com/jestjs/jest.git.
@@ -508,6 +536,206 @@ Licensed under BSD-3-Clause license in the repository at git+https://github.com/
508
536
  >
509
537
  > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
510
538
 
539
+ ### @vercel/detect-agent
540
+
541
+ Licensed under Apache-2.0 license in the repository at https://github.com/vercel/vercel.git.
542
+
543
+ > Apache License
544
+ > Version 2.0, January 2004
545
+ > http://www.apache.org/licenses/
546
+ >
547
+ > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
548
+ >
549
+ > 1. Definitions.
550
+ >
551
+ > "License" shall mean the terms and conditions for use, reproduction,
552
+ > and distribution as defined by Sections 1 through 9 of this document.
553
+ >
554
+ > "Licensor" shall mean the copyright owner or entity authorized by
555
+ > the copyright owner that is granting the License.
556
+ >
557
+ > "Legal Entity" shall mean the union of the acting entity and all
558
+ > other entities that control, are controlled by, or are under common
559
+ > control with that entity. For the purposes of this definition,
560
+ > "control" means (i) the power, direct or indirect, to cause the
561
+ > direction or management of such entity, whether by contract or
562
+ > otherwise, or (ii) ownership of fifty percent (50%) or more of the
563
+ > outstanding shares, or (iii) beneficial ownership of such entity.
564
+ >
565
+ > "You" (or "Your") shall mean an individual or Legal Entity
566
+ > exercising permissions granted by this License.
567
+ >
568
+ > "Source" form shall mean the preferred form for making modifications,
569
+ > including but not limited to software source code, documentation
570
+ > source, and configuration files.
571
+ >
572
+ > "Object" form shall mean any form resulting from mechanical
573
+ > transformation or translation of a Source form, including but
574
+ > not limited to compiled object code, generated documentation,
575
+ > and conversions to other media types.
576
+ >
577
+ > "Work" shall mean the work of authorship, whether in Source or
578
+ > Object form, made available under the License, as indicated by a
579
+ > copyright notice that is included in or attached to the work
580
+ > (an example is provided in the Appendix below).
581
+ >
582
+ > "Derivative Works" shall mean any work, whether in Source or Object
583
+ > form, that is based on (or derived from) the Work and for which the
584
+ > editorial revisions, annotations, elaborations, or other modifications
585
+ > represent, as a whole, an original work of authorship. For the purposes
586
+ > of this License, Derivative Works shall not include works that remain
587
+ > separable from, or merely link (or bind by name) to the interfaces of,
588
+ > the Work and Derivative Works thereof.
589
+ >
590
+ > "Contribution" shall mean any work of authorship, including
591
+ > the original version of the Work and any modifications or additions
592
+ > to that Work or Derivative Works thereof, that is intentionally
593
+ > submitted to Licensor for inclusion in the Work by the copyright owner
594
+ > or by an individual or Legal Entity authorized to submit on behalf of
595
+ > the copyright owner. For the purposes of this definition, "submitted"
596
+ > means any form of electronic, verbal, or written communication sent
597
+ > to the Licensor or its representatives, including but not limited to
598
+ > communication on electronic mailing lists, source code control systems,
599
+ > and issue tracking systems that are managed by, or on behalf of, the
600
+ > Licensor for the purpose of discussing and improving the Work, but
601
+ > excluding communication that is conspicuously marked or otherwise
602
+ > designated in writing by the copyright owner as "Not a Contribution."
603
+ >
604
+ > "Contributor" shall mean Licensor and any individual or Legal Entity
605
+ > on behalf of whom a Contribution has been received by Licensor and
606
+ > subsequently incorporated within the Work.
607
+ >
608
+ > 2. Grant of Copyright License. Subject to the terms and conditions of
609
+ > this License, each Contributor hereby grants to You a perpetual,
610
+ > worldwide, non-exclusive, no-charge, royalty-free, irrevocable
611
+ > copyright license to reproduce, prepare Derivative Works of,
612
+ > publicly display, publicly perform, sublicense, and distribute the
613
+ > Work and such Derivative Works in Source or Object form.
614
+ > 3. Grant of Patent License. Subject to the terms and conditions of
615
+ > this License, each Contributor hereby grants to You a perpetual,
616
+ > worldwide, non-exclusive, no-charge, royalty-free, irrevocable
617
+ > (except as stated in this section) patent license to make, have made,
618
+ > use, offer to sell, sell, import, and otherwise transfer the Work,
619
+ > where such license applies only to those patent claims licensable
620
+ > by such Contributor that are necessarily infringed by their
621
+ > Contribution(s) alone or by combination of their Contribution(s)
622
+ > with the Work to which such Contribution(s) was submitted. If You
623
+ > institute patent litigation against any entity (including a
624
+ > cross-claim or counterclaim in a lawsuit) alleging that the Work
625
+ > or a Contribution incorporated within the Work constitutes direct
626
+ > or contributory patent infringement, then any patent licenses
627
+ > granted to You under this License for that Work shall terminate
628
+ > as of the date such litigation is filed.
629
+ > 4. Redistribution. You may reproduce and distribute copies of the
630
+ > Work or Derivative Works thereof in any medium, with or without
631
+ > modifications, and in Source or Object form, provided that You
632
+ > meet the following conditions:
633
+ >
634
+ > (a) You must give any other recipients of the Work or
635
+ > Derivative Works a copy of this License; and
636
+ >
637
+ > (b) You must cause any modified files to carry prominent notices
638
+ > stating that You changed the files; and
639
+ >
640
+ > (c) You must retain, in the Source form of any Derivative Works
641
+ > that You distribute, all copyright, patent, trademark, and
642
+ > attribution notices from the Source form of the Work,
643
+ > excluding those notices that do not pertain to any part of
644
+ > the Derivative Works; and
645
+ >
646
+ > (d) If the Work includes a "NOTICE" text file as part of its
647
+ > distribution, then any Derivative Works that You distribute must
648
+ > include a readable copy of the attribution notices contained
649
+ > within such NOTICE file, excluding those notices that do not
650
+ > pertain to any part of the Derivative Works, in at least one
651
+ > of the following places: within a NOTICE text file distributed
652
+ > as part of the Derivative Works; within the Source form or
653
+ > documentation, if provided along with the Derivative Works; or,
654
+ > within a display generated by the Derivative Works, if and
655
+ > wherever such third-party notices normally appear. The contents
656
+ > of the NOTICE file are for informational purposes only and
657
+ > do not modify the License. You may add Your own attribution
658
+ > notices within Derivative Works that You distribute, alongside
659
+ > or as an addendum to the NOTICE text from the Work, provided
660
+ > that such additional attribution notices cannot be construed
661
+ > as modifying the License.
662
+ >
663
+ > You may add Your own copyright statement to Your modifications and
664
+ > may provide additional or different license terms and conditions
665
+ > for use, reproduction, or distribution of Your modifications, or
666
+ > for any such Derivative Works as a whole, provided Your use,
667
+ > reproduction, and distribution of the Work otherwise complies with
668
+ > the conditions stated in this License.
669
+ >
670
+ > 5. Submission of Contributions. Unless You explicitly state otherwise,
671
+ > any Contribution intentionally submitted for inclusion in the Work
672
+ > by You to the Licensor shall be under the terms and conditions of
673
+ > this License, without any additional terms or conditions.
674
+ > Notwithstanding the above, nothing herein shall supersede or modify
675
+ > the terms of any separate license agreement you may have executed
676
+ > with Licensor regarding such Contributions.
677
+ > 6. Trademarks. This License does not grant permission to use the trade
678
+ > names, trademarks, service marks, or product names of the Licensor,
679
+ > except as required for reasonable and customary use in describing the
680
+ > origin of the Work and reproducing the content of the NOTICE file.
681
+ > 7. Disclaimer of Warranty. Unless required by applicable law or
682
+ > agreed to in writing, Licensor provides the Work (and each
683
+ > Contributor provides its Contributions) on an "AS IS" BASIS,
684
+ > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
685
+ > implied, including, without limitation, any warranties or conditions
686
+ > of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
687
+ > PARTICULAR PURPOSE. You are solely responsible for determining the
688
+ > appropriateness of using or redistributing the Work and assume any
689
+ > risks associated with Your exercise of permissions under this License.
690
+ > 8. Limitation of Liability. In no event and under no legal theory,
691
+ > whether in tort (including negligence), contract, or otherwise,
692
+ > unless required by applicable law (such as deliberate and grossly
693
+ > negligent acts) or agreed to in writing, shall any Contributor be
694
+ > liable to You for damages, including any direct, indirect, special,
695
+ > incidental, or consequential damages of any character arising as a
696
+ > result of this License or out of the use or inability to use the
697
+ > Work (including but not limited to damages for loss of goodwill,
698
+ > work stoppage, computer failure or malfunction, or any and all
699
+ > other commercial damages or losses), even if such Contributor
700
+ > has been advised of the possibility of such damages.
701
+ > 9. Accepting Warranty or Additional Liability. While redistributing
702
+ > the Work or Derivative Works thereof, You may choose to offer,
703
+ > and charge a fee for, acceptance of support, warranty, indemnity,
704
+ > or other liability obligations and/or rights consistent with this
705
+ > License. However, in accepting such obligations, You may act only
706
+ > on Your own behalf and on Your sole responsibility, not on behalf
707
+ > of any other Contributor, and only if You agree to indemnify,
708
+ > defend, and hold each Contributor harmless for any liability
709
+ > incurred by, or claims asserted against, such Contributor by reason
710
+ > of your accepting any such warranty or additional liability.
711
+ >
712
+ > END OF TERMS AND CONDITIONS
713
+ >
714
+ > APPENDIX: How to apply the Apache License to your work.
715
+ >
716
+ > To apply the Apache License to your work, attach the following
717
+ > boilerplate notice, with the fields enclosed by brackets "[]"
718
+ > replaced with your own identifying information. (Don't include
719
+ > the brackets!) The text should be enclosed in the appropriate
720
+ > comment syntax for the file format. We also recommend that a
721
+ > file or class name and description of purpose be included on the
722
+ > same "printed page" as the copyright notice for easier
723
+ > identification within third-party archives.
724
+ >
725
+ > Copyright 2017 Vercel, Inc.
726
+ >
727
+ > Licensed under the Apache License, Version 2.0 (the "License");
728
+ > you may not use this file except in compliance with the License.
729
+ > You may obtain a copy of the License at
730
+ >
731
+ > http://www.apache.org/licenses/LICENSE-2.0
732
+ >
733
+ > Unless required by applicable law or agreed to in writing, software
734
+ > distributed under the License is distributed on an "AS IS" BASIS,
735
+ > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
736
+ > See the License for the specific language governing permissions and
737
+ > limitations under the License.
738
+
511
739
  ### @vitest/expect
512
740
 
513
741
  Licensed under MIT license in the repository at git+https://github.com/vitest-dev/vitest.git.
@@ -953,6 +1181,32 @@ Licensed under MIT license in the repository at git+https://github.com/Rich-Harr
953
1181
  >
954
1182
  > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
955
1183
 
1184
+ ### package-manager-detector
1185
+
1186
+ Licensed under MIT license in the repository at git+https://github.com/antfu-collective/package-manager-detector.git.
1187
+
1188
+ > MIT License
1189
+ >
1190
+ > Copyright (c) 2020-PRESENT Anthony Fu <https://github.com/antfu>
1191
+ >
1192
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1193
+ > of this software and associated documentation files (the "Software"), to deal
1194
+ > in the Software without restriction, including without limitation the rights
1195
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1196
+ > copies of the Software, and to permit persons to whom the Software is
1197
+ > furnished to do so, subject to the following conditions:
1198
+ >
1199
+ > The above copyright notice and this permission notice shall be included in all
1200
+ > copies or substantial portions of the Software.
1201
+ >
1202
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1203
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1204
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1205
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1206
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1207
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1208
+ > SOFTWARE.
1209
+
956
1210
  ### pathe
957
1211
 
958
1212
  Licensed under MIT license in the repository at unjs/pathe.
@@ -1179,6 +1433,32 @@ Licensed under MIT license in the repository at https://github.com/rspack-contri
1179
1433
  > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1180
1434
  > SOFTWARE.
1181
1435
 
1436
+ ### sisteransi
1437
+
1438
+ Licensed under MIT license in the repository at https://github.com/terkelg/sisteransi.
1439
+
1440
+ > MIT License
1441
+ >
1442
+ > Copyright (c) 2018 Terkel Gjervig Nielsen
1443
+ >
1444
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1445
+ > of this software and associated documentation files (the "Software"), to deal
1446
+ > in the Software without restriction, including without limitation the rights
1447
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1448
+ > copies of the Software, and to permit persons to whom the Software is
1449
+ > furnished to do so, subject to the following conditions:
1450
+ >
1451
+ > The above copyright notice and this permission notice shall be included in all
1452
+ > copies or substantial portions of the Software.
1453
+ >
1454
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1455
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1456
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1457
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1458
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1459
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1460
+ > SOFTWARE.
1461
+
1182
1462
  ### source-map
1183
1463
 
1184
1464
  Licensed under BSD-3-Clause license in the repository at http://github.com/mozilla/source-map.git.
@@ -1416,3 +1696,17 @@ Licensed under MIT license in the repository at git+ssh://git@github.com/chaijs/
1416
1696
  > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1417
1697
  > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1418
1698
  > THE SOFTWARE.
1699
+
1700
+ ### url-extras
1701
+
1702
+ Licensed under MIT license in the repository at sindresorhus/url-extras.
1703
+
1704
+ > MIT License
1705
+ >
1706
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
1707
+ >
1708
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1709
+ >
1710
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1711
+ >
1712
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/dist/0~130.js CHANGED
@@ -3,8 +3,8 @@ import 'module';
3
3
  import { __webpack_require__ } from "./rslib-runtime.js";
4
4
  import { AssertionError, strict } from "node:assert";
5
5
  import { Console } from "node:console";
6
- import "./5693.js";
7
- import { prettyTime } from "./1157.js";
6
+ import "./721.js";
7
+ import { prettyTime } from "./2672.js";
8
8
  const external_node_util_ = __webpack_require__("node:util");
9
9
  const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
10
10
  var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
package/dist/0~1472.js ADDED
@@ -0,0 +1,48 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
3
+ import { __webpack_require__ } from "./rslib-runtime.js";
4
+ import "./2672.js";
5
+ import { createRequire } from "./4881.js";
6
+ import { pathToFileURL } from "./6198.js";
7
+ import "./1157.js";
8
+ import { logger as logger_logger } from "./3278.js";
9
+ const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
10
+ var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
11
+ async function loadBrowserModule(options = {}) {
12
+ const coreVersion = "0.8.0";
13
+ const { projectRoots = [] } = options;
14
+ let browserModule;
15
+ let browserVersion;
16
+ const resolutionBases = [
17
+ ...projectRoots.map((projectRoot)=>pathToFileURL(`${projectRoot}/package.json`).href),
18
+ pathToFileURL(`${process.cwd()}/package.json`).href,
19
+ import.meta.url
20
+ ];
21
+ const uniqueBases = [
22
+ ...new Set(resolutionBases)
23
+ ];
24
+ for (const base of uniqueBases)try {
25
+ const userRequire = createRequire(base);
26
+ const browserPath = userRequire.resolve('@rstest/browser');
27
+ const browserPkgPath = userRequire.resolve('@rstest/browser/package.json');
28
+ browserModule = await import(pathToFileURL(browserPath).href);
29
+ const browserPkg = userRequire(browserPkgPath);
30
+ browserVersion = browserPkg.version;
31
+ if (browserVersion !== coreVersion) {
32
+ logger_logger.error(`\n${picocolors_default().red('Error:')} Version mismatch between ${picocolors_default().cyan('@rstest/core')} and ${picocolors_default().cyan('@rstest/browser')}.\n`);
33
+ logger_logger.error(` @rstest/core version: ${picocolors_default().yellow(coreVersion)}\n @rstest/browser version: ${picocolors_default().yellow(browserVersion)}\n`);
34
+ logger_logger.error(`Please ensure both packages have the same version:\n\n ${picocolors_default().cyan(`npm install @rstest/browser@${coreVersion}`)}\n`);
35
+ process.exit(1);
36
+ }
37
+ return browserModule;
38
+ } catch (error) {
39
+ const err = error;
40
+ if ('ERR_MODULE_NOT_FOUND' === err.code || 'MODULE_NOT_FOUND' === err.code) continue;
41
+ throw error;
42
+ }
43
+ logger_logger.error(`\n${picocolors_default().red('Error:')} Browser mode requires ${picocolors_default().cyan('@rstest/browser')} to be installed.\n`);
44
+ logger_logger.error(`Please install it with:\n\n ${picocolors_default().cyan(`npm install @rstest/browser@${coreVersion}`)}\n`);
45
+ logger_logger.error(`Or if using pnpm:\n\n ${picocolors_default().cyan(`pnpm add @rstest/browser@${coreVersion}`)}\n`);
46
+ process.exit(1);
47
+ }
48
+ export { loadBrowserModule };
package/dist/0~1981.js ADDED
@@ -0,0 +1,3 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
3
+ export { Readable, Writable } from "node:stream";
package/dist/0~2173.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  import { __webpack_require__ } from "./rslib-runtime.js";
4
- import "./5693.js";
5
- import { getTestEntries, isTTY } from "./1157.js";
4
+ import { isTTY } from "./2672.js";
5
+ import { getTestEntries } from "./1157.js";
6
6
  import { createCoverageProvider } from "./5734.js";
7
7
  import { prepareRsbuild, createPool, createRsbuildServer, runGlobalTeardown, runGlobalSetup } from "./0~89.js";
8
- import { clearScreen, logger_logger } from "./3278.js";
8
+ import { loadBrowserModule } from "./0~1472.js";
9
+ import { clearScreen, logger as logger_logger } from "./3278.js";
9
10
  const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
10
11
  var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
11
12
  const isCliShortcutsEnabled = ()=>isTTY('stdin');
@@ -35,7 +36,7 @@ async function setupCliShortcuts({ closeServer, runAll, updateSnapshot, runFaile
35
36
  render();
36
37
  const onPromptKey = async (str, key)=>{
37
38
  if (!isPrompting) return;
38
- if (key.ctrl && 'c' === key.name) process.exit(0);
39
+ if (key.ctrl && 'c' === key.name) return void process.kill(process.pid, 'SIGINT');
39
40
  if ('return' === key.name || 'enter' === key.name) {
40
41
  process.stdin.off('keypress', onPromptKey);
41
42
  process.stdout.write('\n');
@@ -126,7 +127,7 @@ async function setupCliShortcuts({ closeServer, runAll, updateSnapshot, runFaile
126
127
  ];
127
128
  const handleKeypress = (str, key)=>{
128
129
  if (isPrompting) return;
129
- if (key.ctrl && 'c' === key.name) process.exit(0);
130
+ if (key.ctrl && 'c' === key.name) return void process.kill(process.pid, 'SIGINT');
130
131
  for (const shortcut of shortcuts)if (str === shortcut.key) {
131
132
  clearCurrentInputLine();
132
133
  shortcut.action();
@@ -149,8 +150,33 @@ async function setupCliShortcuts({ closeServer, runAll, updateSnapshot, runFaile
149
150
  rl.close();
150
151
  };
151
152
  }
153
+ async function runBrowserModeTests(context, browserProjects, options) {
154
+ const projectRoots = browserProjects.map((p)=>p.rootPath);
155
+ const { runBrowserTests } = await loadBrowserModule({
156
+ projectRoots
157
+ });
158
+ return runBrowserTests(context, options);
159
+ }
152
160
  async function runTests(context) {
153
- const { rootPath, reporters, projects, snapshotManager, command, normalizedConfig: { coverage } } = context;
161
+ const browserProjects = context.projects.filter((project)=>project.normalizedConfig.browser.enabled);
162
+ const nodeProjects = context.projects.filter((project)=>!project.normalizedConfig.browser.enabled);
163
+ const hasBrowserTests = context.normalizedConfig.browser.enabled || browserProjects.length > 0;
164
+ const hasNodeTests = nodeProjects.length > 0;
165
+ const isWatchMode = 'watch' === context.command;
166
+ const shouldUnifyReporter = !isWatchMode && hasBrowserTests && hasNodeTests;
167
+ if (hasBrowserTests && !hasNodeTests) return void await runBrowserModeTests(context, browserProjects, {
168
+ skipOnTestRunEnd: false
169
+ });
170
+ let browserResultPromise;
171
+ if (hasBrowserTests) browserResultPromise = runBrowserModeTests(context, browserProjects, {
172
+ skipOnTestRunEnd: shouldUnifyReporter
173
+ });
174
+ if (!hasNodeTests) {
175
+ if (browserResultPromise) await browserResultPromise;
176
+ return;
177
+ }
178
+ const projects = nodeProjects;
179
+ const { rootPath, reporters, snapshotManager, command, normalizedConfig: { coverage } } = context;
154
180
  const entriesCache = new Map();
155
181
  const globTestSourceEntries = async (name)=>{
156
182
  const { include, exclude, includeSource, root } = projects.find((p)=>p.environmentName === name).normalizedConfig;
@@ -168,10 +194,10 @@ async function runTests(context) {
168
194
  });
169
195
  return entries;
170
196
  };
171
- const { getSetupFiles } = await import("./0~6973.js").then((mod)=>({
197
+ const { getSetupFiles } = await import("./6973.js").then((mod)=>({
172
198
  getSetupFiles: mod.getSetupFiles
173
199
  }));
174
- const setupFiles = Object.fromEntries(context.projects.map((project)=>{
200
+ const setupFiles = Object.fromEntries(projects.map((project)=>{
175
201
  const { environmentName, rootPath, normalizedConfig: { setupFiles } } = project;
176
202
  return [
177
203
  environmentName,
@@ -186,11 +212,10 @@ async function runTests(context) {
186
212
  ];
187
213
  }));
188
214
  const rsbuildInstance = await prepareRsbuild(context, globTestSourceEntries, setupFiles, globalSetupFiles);
189
- const isWatchMode = 'watch' === command;
190
215
  const { getRsbuildStats, closeServer } = await createRsbuildServer({
191
216
  inspectedConfig: {
192
217
  ...context.normalizedConfig,
193
- projects: context.projects.map((p)=>p.normalizedConfig)
218
+ projects: projects.map((p)=>p.normalizedConfig)
194
219
  },
195
220
  isWatchMode,
196
221
  globTestSourceEntries: isWatchMode ? globTestSourceEntries : async (name)=>{
@@ -211,12 +236,13 @@ async function runTests(context) {
211
236
  const coverageProvider = coverage.enabled ? await createCoverageProvider(coverage, context.rootPath) : null;
212
237
  if (coverageProvider) logger_logger.log(` ${picocolors_default().gray('Coverage enabled with')} %s\n`, picocolors_default().yellow(coverage.provider));
213
238
  const run = async ({ fileFilters, mode = 'all', buildStart = Date.now() } = {})=>{
239
+ for (const reporter of reporters)await reporter.onTestRunStart?.();
214
240
  let testStart;
215
241
  const currentEntries = [];
216
242
  const currentDeletedEntries = [];
217
243
  context.stateManager.reset();
218
244
  context.stateManager.testFiles = isWatchMode ? void 0 : entryFiles;
219
- const returns = await Promise.all(context.projects.map(async (p)=>{
245
+ const returns = await Promise.all(projects.map(async (p)=>{
220
246
  const { assetNames, entries, setupEntries, globalSetupEntries, getAssetFiles, getSourceMaps, affectedEntries, deletedEntries } = await getRsbuildStats({
221
247
  environmentName: p.environmentName,
222
248
  fileFilters
@@ -267,7 +293,12 @@ async function runTests(context) {
267
293
  }));
268
294
  const buildTime = testStart - buildStart;
269
295
  const testTime = Date.now() - testStart;
270
- const duration = {
296
+ const browserResult = browserResultPromise ? await browserResultPromise : void 0;
297
+ const duration = shouldUnifyReporter && browserResult ? {
298
+ totalTime: testTime + buildTime + browserResult.duration.totalTime,
299
+ buildTime: buildTime + browserResult.duration.buildTime,
300
+ testTime: testTime + browserResult.duration.testTime
301
+ } : {
271
302
  totalTime: testTime + buildTime,
272
303
  buildTime,
273
304
  testTime
@@ -276,6 +307,8 @@ async function runTests(context) {
276
307
  const testResults = returns.flatMap((r)=>r.testResults);
277
308
  const errors = returns.flatMap((r)=>r.errors || []);
278
309
  context.updateReporterResultState(results, testResults, currentDeletedEntries);
310
+ const nodeHasFailure = results.some((r)=>'fail' === r.status) || errors.length;
311
+ const browserHasFailure = shouldUnifyReporter && browserResult?.hasFailure;
279
312
  if (0 === results.length && !errors.length) {
280
313
  if ('watch' === command) if ('on-demand' === mode) logger_logger.log(picocolors_default().yellow('No test files need re-run.'));
281
314
  else logger_logger.log(picocolors_default().yellow('No test files found.'));
@@ -286,17 +319,18 @@ async function runTests(context) {
286
319
  }
287
320
  if ('all' === mode) {
288
321
  if (context.fileFilters?.length) logger_logger.log(picocolors_default().gray('filter: '), context.fileFilters.join(picocolors_default().gray(', ')));
289
- context.projects.forEach((p)=>{
290
- if (context.projects.length > 1) {
322
+ projects.forEach((p)=>{
323
+ if (projects.length > 1) {
291
324
  logger_logger.log('');
292
325
  logger_logger.log(picocolors_default().gray('project:'), p.name);
293
326
  }
327
+ logger_logger.log(picocolors_default().gray('root:'), p.rootPath);
294
328
  logger_logger.log(picocolors_default().gray('include:'), p.normalizedConfig.include.join(picocolors_default().gray(', ')));
295
329
  logger_logger.log(picocolors_default().gray('exclude:'), p.normalizedConfig.exclude.patterns.join(picocolors_default().gray(', ')));
296
330
  });
297
331
  }
298
332
  }
299
- const isFailure = results.some((r)=>'fail' === r.status) || errors.length;
333
+ const isFailure = nodeHasFailure || browserHasFailure;
300
334
  if (isFailure) process.exitCode = 1;
301
335
  for (const reporter of reporters)await reporter.onTestRunEnd?.({
302
336
  results: context.reporterResults.results,
@@ -326,6 +360,25 @@ async function runTests(context) {
326
360
  };
327
361
  if ('watch' === command) {
328
362
  const enableCliShortcuts = isCliShortcutsEnabled();
363
+ let isCleaningUp = false;
364
+ const cleanup = async ()=>{
365
+ if (isCleaningUp) return;
366
+ isCleaningUp = true;
367
+ try {
368
+ await runGlobalTeardown();
369
+ await pool.close();
370
+ await closeServer();
371
+ } catch (error) {
372
+ logger_logger.log(picocolors_default().red(`Error during cleanup: ${error}`));
373
+ }
374
+ };
375
+ const handleSignal = async (signal)=>{
376
+ logger_logger.log(picocolors_default().yellow(`\nReceived ${signal}, cleaning up...`));
377
+ await cleanup();
378
+ process.exit('SIGINT' === signal ? 130 : 143);
379
+ };
380
+ process.on('SIGINT', handleSignal);
381
+ process.on('SIGTERM', handleSignal);
329
382
  const afterTestsWatchRun = ()=>{
330
383
  logger_logger.log(picocolors_default().green(' Waiting for file changes...'));
331
384
  if (enableCliShortcuts) if (snapshotManager.summary.unmatched) logger_logger.log(` ${picocolors_default().dim('press')} ${picocolors_default().yellow(picocolors_default().bold('u'))} ${picocolors_default().dim('to update snapshot')}${picocolors_default().dim(', press')} ${picocolors_default().bold('h')} ${picocolors_default().dim('to show help')}\n`);
@@ -420,6 +473,18 @@ async function runTests(context) {
420
473
  });
421
474
  } else {
422
475
  let isTeardown = false;
476
+ let isCleaningUp = false;
477
+ const cleanup = async ()=>{
478
+ if (isCleaningUp) return;
479
+ isCleaningUp = true;
480
+ try {
481
+ await runGlobalTeardown();
482
+ await pool.close();
483
+ await closeServer();
484
+ } catch (error) {
485
+ logger_logger.log(picocolors_default().red(`Error during cleanup: ${error}`));
486
+ }
487
+ };
423
488
  const unExpectedExit = (code)=>{
424
489
  if (isTeardown) logger_logger.log(picocolors_default().yellow(`Rstest exited unexpectedly with code ${code}, this is likely caused by test environment teardown.`));
425
490
  else {
@@ -430,13 +495,25 @@ async function runTests(context) {
430
495
  process.exitCode = 1;
431
496
  }
432
497
  };
498
+ const handleSignal = async (signal)=>{
499
+ logger_logger.log(picocolors_default().yellow(`\nReceived ${signal}, cleaning up...`));
500
+ await cleanup();
501
+ process.exit('SIGINT' === signal ? 130 : 143);
502
+ };
433
503
  process.on('exit', unExpectedExit);
434
- await run();
435
- isTeardown = true;
436
- await pool.close();
437
- await closeServer();
438
- await runGlobalTeardown();
439
- process.off('exit', unExpectedExit);
504
+ process.on('SIGINT', handleSignal);
505
+ process.on('SIGTERM', handleSignal);
506
+ try {
507
+ await run();
508
+ isTeardown = true;
509
+ await pool.close();
510
+ await closeServer();
511
+ await runGlobalTeardown();
512
+ } finally{
513
+ process.off('exit', unExpectedExit);
514
+ process.off('SIGINT', handleSignal);
515
+ process.off('SIGTERM', handleSignal);
516
+ }
440
517
  }
441
518
  }
442
519
  export { runTests };
package/dist/0~2255.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  import { __webpack_require__ } from "./rslib-runtime.js";
4
- import "./5693.js";
4
+ import "./2672.js";
5
5
  const external_node_fs_ = __webpack_require__("node:fs");
6
6
  const pluginCoverageCore = (coverageOptions)=>({
7
7
  name: 'rstest:coverage-core',
package/dist/0~3062.js CHANGED
@@ -2,8 +2,6 @@ import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  const LIVING_KEYS = [
4
4
  'DOMException',
5
- 'URL',
6
- 'URLSearchParams',
7
5
  'EventTarget',
8
6
  'NamedNodeMap',
9
7
  'Node',
@@ -173,9 +171,6 @@ const LIVING_KEYS = [
173
171
  'ShadowRoot',
174
172
  'MutationObserver',
175
173
  'MutationRecord',
176
- 'Headers',
177
- 'AbortController',
178
- 'AbortSignal',
179
174
  'Uint8Array',
180
175
  'Uint16Array',
181
176
  'Uint32Array',
package/dist/0~3919.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
3
  import { __webpack_require__ } from "./rslib-runtime.js";
4
- import "./5693.js";
4
+ import "./2672.js";
5
5
  __webpack_require__.add({
6
6
  "../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js" (__unused_rspack_module, exports) {
7
7
  Object.defineProperty(exports, "__esModule", {