Public methods require detailed descriptions, use cases, and parameter/return documentation. If the method throws errors, use @throws {@link ErrorType}. Always include an @example block.
/**
* @description
* [Detailed description of what the method does]
* [Explain the use case and when to use this method]
* [Include any important details about behavior]
*
* @since [version]
* @template [T] [Description of generic parameter]
* @param paramName - [Description of parameter and its purpose]
* @returns [Description of what is returned]
* @throws {@link ErrorType} [Description of when this error is thrown]
*
* @example
* import { Class } from '@suites/package';
* import { Dependency } from './dependency';
*
* // Example usage with context
* const result = await instance.method(param);
*
* @see [link to docs]
*/
public method<T>(param: Type): ReturnType {
// ...
}
/**
* @description
* Initializes a solitary test environment builder for a specified class. In a solitary environment,
* all dependencies are mocked by default, ensuring that tests are isolated to the class under test only.
* This method is ideal for testing the internal logic of the class without external interactions.
*
* @since 3.0.0
* @template TClass The type of the class to be tested.
* @param targetClass - The class for which the test environment is constructed.
* @returns A builder to configure the solitary test environment.
* @see https://suites.dev/docs/developer-guide/unit-tests
*
* @example
* import { TestBed } from '@suites/unit';
* import { MyService } from './my-service';
*
* const { unit, unitRef } = await TestBed.solitary(MyService).compile();
*/
public static solitary<TClass = any>(targetClass: Type<TClass>): SolitaryTestBedBuilder<TClass> {
// ...
}