Allow TechDocsAddonTester to be extended.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-05-09 14:50:33 +02:00
parent 7d18cacd90
commit 7c398c6473
3 changed files with 8 additions and 1 deletions
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-addons-test-utils': patch
---
The `TechDocsAddonTester` class may now be extended if custom test configuration is needed.
@@ -12,6 +12,7 @@ import { TechDocsMetadata } from '@backstage/plugin-techdocs-react';
// @public (undocumented)
export class TechDocsAddonTester {
protected constructor(addons: ReactElement[]);
// (undocumented)
atPath(path: string): this;
// (undocumented)
@@ -119,7 +119,8 @@ export class TechDocsAddonTester {
return new TechDocsAddonTester(addons);
}
private constructor(addons: ReactElement[]) {
// Protected in order to allow extension but not direct instantiation.
protected constructor(addons: ReactElement[]) {
this.addons = addons;
}