Skip to content

Commit 5a82700

Browse files
committed
some minor updates
1 parent 7ee5ba0 commit 5a82700

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/commands/run.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,21 @@ export default class RunProject {
1313
private uploader: Uploader | undefined = undefined;
1414

1515
constructor(argv: Arguments) {
16-
this.start();
16+
try {
17+
this.start();
18+
} catch (e) {
19+
console.log('error', e)
20+
log.error(e)
21+
}
1722
}
1823

1924
public async start(): Promise<void> {
2025
const config = await Config.getConfig();
21-
const configValidationError = Config.validate(config);
22-
if (configValidationError) {
26+
const configValidationErrors = Config.validate(config);
27+
28+
if (configValidationErrors.length > 0) {
2329
throw new Error(
24-
`Configuration error: ${configValidationError.join('\n')}`,
30+
`Configuration errors: ${configValidationErrors.join('\n')}`,
2531
);
2632
}
2733

src/utils/uploader.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@ export default class Uploader {
1414
return new Promise((resolve, reject) => {
1515
const requestOptions = {
1616
method: 'POST',
17-
uri: 'https://api.testingbot.com/v1/storage',
17+
uri: `https://api.testingbot.com/v1/cypress`,
1818
auth: {
1919
user: this.config.auth.key,
2020
pass: this.config.auth.secret,
2121
sendImmediately: true,
2222
},
2323
formData: {
2424
file: fs.createReadStream(zipFile),
25+
capabilities: JSON.stringify([{
26+
platform: 'MOJAVE',
27+
browserName: 'chrome',
28+
version: '82'
29+
}])
2530
},
2631
};
2732

0 commit comments

Comments
 (0)