-
Notifications
You must be signed in to change notification settings - Fork 668
-added a test to check the error from the issue 1820 #1832
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
Conversation
test/specs/wrapper/find.spec.js
Outdated
] | ||
const router = new VueRouter({ routes }) | ||
// and this will not work with shallowMount because router view gets stubbed! How can I just test mount? | ||
const wrapper = mountingMethod( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mountingMethod
is both mount
and shallowMount
. We run all tests for both. If you don't want to run the test for one, just import the one you want on line 2 from packages/src/test-utils
. Or you can do a check with the doNotTestIf
helpers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok done that.
…t will stub the router-view and fails.
Thanks, I'll look at this today! |
packages/test-utils/src/matches.js
Outdated
// ignore the functional component if its a RouterView | ||
// Find a good explanation comment why tahts the case, please help! | ||
const componentInstance = | ||
node[FUNCTIONAL_OPTIONS]?.name === 'RouterView' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have an extra check? Just to be sure:
node[FUNCTIONAL_OPTIONS] && node[FUNCTIONAL_OPTIONS].name
I am not sure if we have ?
enabled in this code base or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: we do not - that's why CI is failing to build. Let's do it old school for now with the &&
check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for that, it worked in the tests, that's why I assumed it's generally working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an extra check! thanks.
I should not use ? operator because it's not compatible in the build process.
@lmiller1990 ok I added the extra check. |
Omg I forgot to remove the ? operator the first time.
@lmiller1990 Dude I am in despair... I can't understand why the karma test are failing and the jest test not. They are almost the same test case. I really really have no idea. |
The only test failing is the one using the router. This PR makes a change that specifically adds a check against I will try taking a look at this on the weekend. I'd suspect if you comment out that check, the Karma tests will pass. That's the first thing I'm going to do - figure out if this failure is due to a change we made, or not. |
…happen.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch.fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: