Skip to content

Commit

Permalink
add more comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
  • Loading branch information
jackiehanyang committed May 30, 2023
1 parent 3295183 commit 2b1204b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/mocks/transformMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

/**
* The transform configuration in Jest allows you to
* specify custom transformation logic for specific file types during testing.
*/
export = {
/**
* This function is responsible for transforming the file.
* @returns the string module.exports = {};, which is an empty CommonJS module.
*/
process(): { code: string } {
return {
code: `module.exports = {};`,
};
},
/**
* The cache key helps Jest determine if a file needs to be retransformed or if it can use the cached transformation result.
* @returns returns a unique string that serves as a cache key for the transformation.
*/
getCacheKey(): string {
return 'svgTransform';
},
Expand Down

0 comments on commit 2b1204b

Please sign in to comment.