Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): fix imports for jsdocs example verification #2281

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Jul 29, 2023

Fixes an issue with our jsdoc example extraction and import guessing that causes rare issues:

- import { faker, fakerjs } from '../../../../../src';
+ import { faker } from '../../../../../src';

faker.internet.email() // 'Kassandra4@hotmail.com'
faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne63@yahoo.com'
faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev' }) // 'Jeanne_Doe88@example.fakerjs.dev'
faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev', allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.fakerjs.dev'

example.fakerjs.dev incorrectly matched the pattern causing fakerjs to be imported and then when typedoc tries to analyze the file it will detect that the import is invalid.

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: test labels Jul 29, 2023
@ST-DDT ST-DDT requested review from a team July 29, 2023 10:48
@ST-DDT ST-DDT self-assigned this Jul 29, 2023
@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Merging #2281 (4737ad5) into next (a4631db) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2281   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files        2641     2641           
  Lines      244831   244831           
  Branches     1082     1084    +2     
=======================================
+ Hits       243853   243859    +6     
+ Misses        951      945    -6     
  Partials       27       27           

see 2 files with indirect coverage changes

@ST-DDT ST-DDT added the c: bug Something isn't working label Jul 29, 2023
@ST-DDT ST-DDT merged commit 2fe1308 into next Jul 29, 2023
20 checks passed
@ST-DDT ST-DDT deleted the fix/test/jsdoc-example-extractor branch July 29, 2023 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working c: test p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants