diff options
| author | ST-DDT <[email protected]> | 2023-07-30 00:21:08 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-30 00:21:08 +0200 |
| commit | 2fe13089c96f6a2826e60c45fa1acf20dde06d41 (patch) | |
| tree | 1b55b2e4333124fd2335b71a32b344989be63a30 /test | |
| parent | a4631dbb82e157bf5b9e63b26de47df396b91f50 (diff) | |
| download | faker-2fe13089c96f6a2826e60c45fa1acf20dde06d41.tar.xz faker-2fe13089c96f6a2826e60c45fa1acf20dde06d41.zip | |
fix(test): fix imports for jsdocs example verification (#2281)
Diffstat (limited to 'test')
| -rw-r--r-- | test/scripts/apidoc/verify-jsdoc-tags.spec.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts index 1e8fc55e..7123a150 100644 --- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts +++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts @@ -117,7 +117,9 @@ describe('verify JSDoc tags', () => { mkdirSync(dir, { recursive: true }); const path = resolvePathToMethodFile(moduleName, methodName); - const imports = [...new Set(examples.match(/faker[^\.]*(?=\.)/g))]; + const imports = [ + ...new Set(examples.match(/(?<!\.)faker[^\.]*(?=\.)/g)), + ]; writeFileSync( path, `import { ${imports.join( |
