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
Account for Windows path delimiter and not throw an error.
Enhancement request: Actually would hope that we could enhance this to only have to do runSnapshotTests(); and it would detect the current component's fixtures files to run the snapshot tests, like we were able to do in marko-tester by just running testFixtures();.
Actual Behavior
Throws an error:
TypeError: Cannot read property '2' of null
at inferName (node_modules/@marko/fixture-snapshots/src/index.ts:130:32)
at findComponentFixtures (node_modules/@marko/fixture-snapshots/src/index.ts:31:25)
at node_modules/@marko/fixture-snapshots/src/index.ts:87:14
at Array.map (<anonymous>)
at Object.findProjectFixtures (node_modules/@marko/fixture-snapshots/src/index.ts:85:6)
at runSnapshotTests (node_modules/@marko/fixture-snapshots/src/jest.ts:11:3)
Possible Fix
Update that line to:
var match = /\\([^\\]+)\\([^\\]+)\.marko$/.exec(p);
Additional Info
Your Environment
Environment name and version: Node.js 10.19.0
Operating System and version: Windows 10
Link to your project: Please ping me in Slack for this.
Steps to Reproduce
Installed @marko/fixture-snapshots.
Created a test component with an ebay-button and some text that's shown when the button is clicked.
The text was updated successfully, but these errors were encountered:
melquan
changed the title
runSnapshotTests throws an error on Windows with additional path segments specified in path.resolve
runSnapshotTests throws an error on Windows when additional path segments are specified in path.resolve arguments
Feb 24, 2020
Version: 1.1.1
Details
inferName throws an error at https://github.com/marko-js/fixture-snapshots/blob/master/src/index.ts#L129 when specifying the following in Windows:
Expected Behavior
Account for Windows path delimiter and not throw an error.
Enhancement request: Actually would hope that we could enhance this to only have to do
runSnapshotTests();
and it would detect the current component's fixtures files to run the snapshot tests, like we were able to do inmarko-tester
by just runningtestFixtures();
.Actual Behavior
Throws an error:
Possible Fix
Update that line to:
Additional Info
Your Environment
Steps to Reproduce
ebay-button
and some text that's shown when the button is clicked.jest -u
.Stack Trace
See above in Actual Behavior section.
The text was updated successfully, but these errors were encountered: