Skip to content

Commit

Permalink
Make RenderOptions optional for renderHtml and renderDom
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbeck committed May 15, 2024
1 parent 4870a85 commit 8f9032d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test-utils/ComponentHarness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class ComponentHarness extends EventEmitter {
* @returns { Page & {html: string} } - a `Page` that has a `html` property with the rendered HTML
* string
*/
renderHtml(options) {
renderHtml(options?: RenderOptions) {
return this._get(function(page) {
page.html = page.get('$harness');
}, options);
Expand All @@ -171,7 +171,7 @@ export class ComponentHarness extends EventEmitter {
* @returns { Page & {fragment: DocumentFragment} } a `Page` that has a `fragment` property with the
* rendered `DocumentFragment`
*/
renderDom(options) {
renderDom(options?: RenderOptions) {
return this._get(function(page) {
page.fragment = page.getFragment('$harness');
}, options);
Expand All @@ -189,7 +189,7 @@ export class ComponentHarness extends EventEmitter {
* @param {(page: PageForHarness) => void} render
* @param {RenderOptions} [options]
*/
_get(renderFn: (page: PageForHarness) => void, options?): PageForHarness {
_get(renderFn: (page: PageForHarness) => void, options?: RenderOptions): PageForHarness {
options = options || {};
const url = options.url || '';

Expand Down

0 comments on commit 8f9032d

Please sign in to comment.