You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://github.com/speedskater/babel-plugin-rewire#test-code-2 a named import is used for the rewire api. Later in the documentation you say If no default export is present, the API-Object named __RewireAPI__ becomes the default export of the module. The example code has no default export so I think the example test should use the default import in order to avoid the as syntax and clarify. The statement If no default export is present, the API-Object named __RewireAPI__ becomes the default export of the module. could be improved by adding and is also available as a named import. If the module without a default export has a named export with the rewire, why also provide it as a default export? Naming clashes are unlikely and no module using this should have an export RewireAPI because that would be confusing.
The text was updated successfully, but these errors were encountered:
In https://github.com/speedskater/babel-plugin-rewire#test-code-2 a named import is used for the rewire api. Later in the documentation you say
If no default export is present, the API-Object named __RewireAPI__ becomes the default export of the module.
The example code has no default export so I think the example test should use the default import in order to avoid theas
syntax and clarify. The statementIf no default export is present, the API-Object named __RewireAPI__ becomes the default export of the module.
could be improved by addingand is also available as a named import
. If the module without a default export has a named export with the rewire, why also provide it as a default export? Naming clashes are unlikely and no module using this should have an export RewireAPI because that would be confusing.The text was updated successfully, but these errors were encountered: