in lib/xMsExampleExtractor.ts [57:103]
public constructor(specPath: string, recordings: string, options: Options) {
if (
specPath === null ||
specPath === undefined ||
typeof specPath.valueOf() !== "string" ||
!specPath.trim().length
) {
throw new Error(
"specPath is a required property of type string and it cannot be an empty string."
);
}
if (
recordings === null ||
recordings === undefined ||
typeof recordings.valueOf() !== "string" ||
!recordings.trim().length
) {
throw new Error(
"recordings is a required property of type string and it cannot be an empty string."
);
}
this.specPath = specPath;
this.recordings = recordings;
if (!options) {
options = {};
}
if (options.output === null || options.output === undefined) {
options.output = process.cwd() + "/output";
}
if (
options.shouldResolveXmsExamples === null ||
options.shouldResolveXmsExamples === undefined
) {
options.shouldResolveXmsExamples = true;
}
if (options.matchApiVersion === null || options.matchApiVersion === undefined) {
options.matchApiVersion = false;
}
this.options = options;
log.debug(`specPath : ${this.specPath}`);
log.debug(`recordings : ${this.recordings}`);
log.debug(`options.output : ${this.options.output}`);
log.debug(`options.matchApiVersion : ${this.options.matchApiVersion}`);
}