twd-cli 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/CHANGELOG.md +8 -0
- package/bin/twd-cli.js +0 -0
- package/package.json +1 -1
- package/src/index.js +15 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## <small>1.0.4 (2025-11-26)</small>
|
|
2
|
+
|
|
3
|
+
* fix: better log errors ([25319ca](https://github.com/BRIKEV/twd-cli/commit/25319ca))
|
|
4
|
+
|
|
5
|
+
## <small>1.0.3 (2025-11-24)</small>
|
|
6
|
+
|
|
7
|
+
* fix: error selector ([1e081a6](https://github.com/BRIKEV/twd-cli/commit/1e081a6))
|
|
8
|
+
|
|
1
9
|
## <small>1.0.2 (2025-11-24)</small>
|
|
2
10
|
|
|
3
11
|
* feat: add basic cli feature ([23bde8c](https://github.com/BRIKEV/twd-cli/commit/23bde8c))
|
package/bin/twd-cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -4,28 +4,27 @@ import puppeteer from 'puppeteer';
|
|
|
4
4
|
import { reportResults } from 'twd-js/runner-ci';
|
|
5
5
|
import { loadConfig } from './config.js';
|
|
6
6
|
|
|
7
|
-
export async function runTests() {
|
|
8
|
-
const config = loadConfig();
|
|
9
|
-
const workingDir = process.cwd();
|
|
10
|
-
|
|
11
|
-
console.log('Starting TWD test runner...');
|
|
12
|
-
console.log('Configuration:', JSON.stringify(config, null, 2));
|
|
13
|
-
|
|
14
|
-
const browser = await puppeteer.launch({
|
|
15
|
-
headless: config.headless,
|
|
16
|
-
args: config.puppeteerArgs,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const page = await browser.newPage();
|
|
20
|
-
console.time('Total Test Time');
|
|
21
|
-
|
|
7
|
+
export async function runTests() {
|
|
22
8
|
try {
|
|
9
|
+
const config = loadConfig();
|
|
10
|
+
const workingDir = process.cwd();
|
|
11
|
+
|
|
12
|
+
console.log('Starting TWD test runner...');
|
|
13
|
+
console.log('Configuration:', JSON.stringify(config, null, 2));
|
|
14
|
+
|
|
15
|
+
const browser = await puppeteer.launch({
|
|
16
|
+
headless: config.headless,
|
|
17
|
+
args: config.puppeteerArgs,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const page = await browser.newPage();
|
|
21
|
+
console.time('Total Test Time');
|
|
23
22
|
// Navigate to your development server
|
|
24
23
|
console.log(`Navigating to ${config.url} ...`);
|
|
25
24
|
await page.goto(config.url);
|
|
26
25
|
|
|
27
26
|
// Wait for the selector to be available
|
|
28
|
-
await page.waitForSelector('
|
|
27
|
+
await page.waitForSelector('#twd-sidebar-root', { timeout: config.timeout });
|
|
29
28
|
console.log('Page loaded. Starting tests...');
|
|
30
29
|
|
|
31
30
|
// Execute all tests
|