@m00nsolutions/playwright-reporter 1.0.2 → 1.0.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/README.md +1 -1
- package/index.cjs +69 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -132,6 +132,6 @@ MIT License - see [LICENSE](LICENSE) for details.
|
|
|
132
132
|
|
|
133
133
|
## Support
|
|
134
134
|
|
|
135
|
-
- 📖 [Documentation](https://docs.
|
|
135
|
+
- 📖 [Documentation](https://docs.m00n.report)
|
|
136
136
|
- 🐛 [Report Issues](https://github.com/m00nsolutions/m00nreport/issues)
|
|
137
137
|
- 💬 [Community Discord](https://discord.gg/m00nreport)
|
package/index.cjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// CommonJS wrapper for M00n Playwright Reporter
|
|
2
|
+
// This allows the reporter to work with both ESM and CommonJS consumers
|
|
3
|
+
|
|
4
|
+
// Dynamic import wrapper for ESM module
|
|
5
|
+
let M00nReporter;
|
|
6
|
+
|
|
7
|
+
// Use dynamic import to load the ESM module
|
|
8
|
+
const loadReporter = async () => {
|
|
9
|
+
if (!M00nReporter) {
|
|
10
|
+
const module = await import('./index.mjs');
|
|
11
|
+
M00nReporter = module.default;
|
|
12
|
+
}
|
|
13
|
+
return M00nReporter;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// Export a class that wraps the ESM reporter
|
|
17
|
+
class M00nReporterWrapper {
|
|
18
|
+
constructor(options) {
|
|
19
|
+
this.options = options;
|
|
20
|
+
this.reporter = null;
|
|
21
|
+
this._initPromise = this._init();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async _init() {
|
|
25
|
+
const ReporterClass = await loadReporter();
|
|
26
|
+
this.reporter = new ReporterClass(this.options);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async _ensureReady() {
|
|
30
|
+
await this._initPromise;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
printsToStdio() {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async onBegin(config, suite) {
|
|
38
|
+
await this._ensureReady();
|
|
39
|
+
return this.reporter.onBegin(config, suite);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async onTestBegin(test, result) {
|
|
43
|
+
await this._ensureReady();
|
|
44
|
+
return this.reporter.onTestBegin(test, result);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async onStepBegin(test, result, step) {
|
|
48
|
+
await this._ensureReady();
|
|
49
|
+
return this.reporter.onStepBegin(test, result, step);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async onStepEnd(test, result, step) {
|
|
53
|
+
await this._ensureReady();
|
|
54
|
+
return this.reporter.onStepEnd(test, result, step);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async onTestEnd(test, result) {
|
|
58
|
+
await this._ensureReady();
|
|
59
|
+
return this.reporter.onTestEnd(test, result);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async onEnd(result) {
|
|
63
|
+
await this._ensureReady();
|
|
64
|
+
return this.reporter.onEnd(result);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = M00nReporterWrapper;
|
|
69
|
+
module.exports.default = M00nReporterWrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m00nsolutions/playwright-reporter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Playwright test reporter for M00n Report dashboard - real-time test result streaming with step tracking, attachments, and retry support",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"url": "https://github.com/m00nsolutions/m00nreport.git",
|
|
43
43
|
"directory": "packages/m00n-playwright-reporter"
|
|
44
44
|
},
|
|
45
|
-
"homepage": "https://
|
|
45
|
+
"homepage": "https://m00n.report",
|
|
46
46
|
"bugs": {
|
|
47
47
|
"url": "https://github.com/m00nsolutions/m00nreport/issues"
|
|
48
48
|
},
|