@rpcbase/test 0.141.0 → 0.143.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/package.json +1 -1
- package/src/clearDatabase.js +1 -1
- package/src/cli.js +19 -1
package/package.json
CHANGED
package/src/clearDatabase.js
CHANGED
|
@@ -6,7 +6,7 @@ export async function clearDatabase(dbName) {
|
|
|
6
6
|
|
|
7
7
|
const connectionString = `mongodb://localhost:${DB_PORT}/${APP_NAME}-${dbName}`
|
|
8
8
|
|
|
9
|
-
console.log("will clear DB:", connectionString)
|
|
9
|
+
// console.log("will clear DB:", connectionString)
|
|
10
10
|
|
|
11
11
|
const connection = await mongoose
|
|
12
12
|
.createConnection(connectionString)
|
package/src/cli.js
CHANGED
|
@@ -13,6 +13,8 @@ if (process.env.IS_AIDER !== undefined && process.env.IS_AIDER !== "yes") {
|
|
|
13
13
|
|
|
14
14
|
function runTests() {
|
|
15
15
|
return new Promise((resolve, reject) => {
|
|
16
|
+
const userArgs = process.argv.slice(2)
|
|
17
|
+
|
|
16
18
|
// Determine config file path
|
|
17
19
|
const configPath = fs.existsSync(
|
|
18
20
|
path.join(process.cwd(), "playwright.config.ts"),
|
|
@@ -20,12 +22,28 @@ function runTests() {
|
|
|
20
22
|
? path.join(process.cwd(), "playwright.config.ts")
|
|
21
23
|
: path.join(__dirname, "playwright.config.ts")
|
|
22
24
|
|
|
25
|
+
const hasCustomConfig = userArgs.some((arg) => {
|
|
26
|
+
if (arg === "--config" || arg === "-c") {
|
|
27
|
+
return true
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return arg.startsWith("--config=")
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const playwrightArgs = ["test"]
|
|
34
|
+
|
|
35
|
+
if (!hasCustomConfig) {
|
|
36
|
+
playwrightArgs.push("--config", configPath)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
playwrightArgs.push(...userArgs)
|
|
40
|
+
|
|
23
41
|
const stdoutBuffer = []
|
|
24
42
|
const stderrBuffer = []
|
|
25
43
|
|
|
26
44
|
const playwright = spawn(
|
|
27
45
|
"./node_modules/.bin/playwright",
|
|
28
|
-
|
|
46
|
+
playwrightArgs,
|
|
29
47
|
{
|
|
30
48
|
shell: false,
|
|
31
49
|
},
|