Skip to content

Commit

Permalink
Fix RunResult doc. (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed May 17, 2021
1 parent 495b863 commit 42f5d56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/run-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ RunContext.prototype._run = function () {
};

/**
* Run the generator on the environment and returns the promise.
* @return {Promise} Promise
* Run the generator on the environment and promises a RunResult instance.
* @return {Promise<RunResult>} Promise a RunResult instance.
*/
RunContext.prototype.run = function () {
if (!this.settings.runEnvironment && this.buildAsync === undefined) {
Expand Down
10 changes: 8 additions & 2 deletions lib/run-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ function convertArgs(args) {
return Array.isArray(arg) ? arg : [arg];
}

module.exports = class RunResult {
/**
* This class provides utilities for testing generated content.
*/

class RunResult {
constructor(options = {cwd: process.cwd()}) {
this.env = options.env;
this.cwd = options.cwd;
Expand Down Expand Up @@ -349,4 +353,6 @@ module.exports = class RunResult {
assertNoJsonFileContent(filename, content) {
this.assertNoObjectContent(this._readFile(filename, true), content);
}
};
}

module.exports = RunResult;

0 comments on commit 42f5d56

Please sign in to comment.