@playwright-orchestrator/mongo 1.6.0 → 1.7.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.
package/dist/mongo-db-adapter.js
CHANGED
|
@@ -64,7 +64,7 @@ let MongoDbAdapter = class MongoDbAdapter extends BaseAdapter {
|
|
|
64
64
|
async saveTestResult({ runId, test, item, historyWindow, newEma }) {
|
|
65
65
|
const updatedDoc = await this.testInfo.findOneAndUpdate({ _id: test.testId }, {
|
|
66
66
|
$set: { ema: newEma },
|
|
67
|
-
// @ts-
|
|
67
|
+
// @ts-expect-error MongoDB typings reject $push with $each/$slice on this document type
|
|
68
68
|
$push: {
|
|
69
69
|
history: {
|
|
70
70
|
$each: [{ duration: item.duration, status: item.status, updated: new Date(item.updated) }],
|
|
@@ -30,8 +30,9 @@ let MongoInitializer = class MongoInitializer {
|
|
|
30
30
|
const set = new Set(collections.map((c) => c.collectionName));
|
|
31
31
|
await Promise.all([
|
|
32
32
|
!set.has(runsCollection) ? database.createCollection(runsCollection) : Promise.resolve(),
|
|
33
|
-
!set.has(testsCollection)
|
|
34
|
-
.then(c => c.createIndex({ status: 1 }))
|
|
33
|
+
!set.has(testsCollection)
|
|
34
|
+
? database.createCollection(testsCollection).then((c) => c.createIndex({ status: 1 }))
|
|
35
|
+
: Promise.resolve(),
|
|
35
36
|
!set.has(testsInfoCollection) ? database.createCollection(testsInfoCollection) : Promise.resolve(),
|
|
36
37
|
]);
|
|
37
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright-orchestrator/mongo",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "Rostyslav Kudrevatykh",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"inversify": "^8.0.0-beta.0",
|
|
19
19
|
"mongodb": "^6.12.0",
|
|
20
20
|
"uuid": "^14.0.0",
|
|
21
|
-
"@playwright-orchestrator/core": "1.
|
|
21
|
+
"@playwright-orchestrator/core": "1.7.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {},
|
|
24
24
|
"main": "dist/index.js",
|