Add command line parsing and configuration management
* Introduced `CommandLine` class for handling command line options and arguments * Added `TestConfiguration` class to manage application credentials and URIs * Implemented example usage for generating command line arguments from a configuration object * Updated `package.json` to include `commander` dependency * Removed unused `TestRunner` class and created a new `TestRunner` for executing tests with command line options * Adjusted logging level type to use lowercase values for consistency
This commit is contained in:
23
test/runner/TestRunner.ts
Normal file
23
test/runner/TestRunner.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import PCastAPI from '@techniker-me/pcast-api';
|
||||
import RtmpPush from '@technniker-me/rtmp-push';
|
||||
import CommandLine from '../config/CommandLine';
|
||||
|
||||
interface CommandLineOptions {
|
||||
applicationId: string;
|
||||
secret: string;
|
||||
logLevel: string;
|
||||
}
|
||||
|
||||
class TestRunner {
|
||||
private static readonly _commandLineOptions: CommandLineOptions = CommandLine.parse(process.argv);
|
||||
|
||||
public static main(): void {
|
||||
// const testRunner = new TestRunner();
|
||||
// testRunner.run();
|
||||
|
||||
console.log(TestRunner._commandLineOptions);
|
||||
}
|
||||
}
|
||||
|
||||
TestRunner.main();
|
||||
|
||||
Reference in New Issue
Block a user