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

Vue.js example code #29

Open
TunaYagci opened this issue Aug 4, 2018 · 6 comments
Open

Vue.js example code #29

TunaYagci opened this issue Aug 4, 2018 · 6 comments
Labels

Comments

@TunaYagci
Copy link

We really require this plugin for Vue.js, but I don't know how to proceed.

@andywer
Copy link
Owner

andywer commented Aug 4, 2018

Hey Tuna. I am not too familiar with Vue.js, but maybe someone else will read this issue who can help you.

Keep in mind that testing frontend components might be tricky. I once tried it with React components, but didn‘t get far. Can‘t tell you the exact reason anymore, but I think that rendering the component and unmounting it didn‘t free the memory completely again and it seemed like React itself or maybe JSDOM was the source of trouble, not the component.

Testing code that does not require the DOM is definitely easier, but feel free to give it a try 😉

@TunaYagci
Copy link
Author

TunaYagci commented Aug 4, 2018

Thank you for your kind comment :)

I'll definitely try this but I need to find a way to automatize heap dumping first. Do you have any experience with that?

Edit: Wait, this library does that too!

@andywer
Copy link
Owner

andywer commented Aug 4, 2018

Yeah, even if you should only be able to write always-failing tests, the heap output might still be helpful 👍

@TunaYagci
Copy link
Author

Okay, another question: we cannot see the object properties from heap output, right? (As in chrome debugger) I'm trying to figure out which VueComponents exactly leaked. I can see it from chrome heap by looking at object properties in the dump.

@andywer
Copy link
Owner

andywer commented Aug 4, 2018

You will see the object prototypes. If you make sure the objects in question have a distinct prototype, you should be able to tell.

@momocow
Copy link

momocow commented Mar 5, 2019

@TunaYagci Maybe Drool is what you are looking for.

This project depends on node-memwatch, which is a Node addon written in C++ to do snapshot on NodeJS V8 engine; therefore, it's quite hard to integrate with front-end memory testing.
Since Vue Components have their life cycles, handlers for user interaction and data bindings, it might contain quite a lot of noise.

I take a peek at Drool and it says it requires chromedriver to work. Maybe it is the right heap to snashot, i.e. the js heap of the browser, while this package snapshots for the js heap in NodeJS V8 engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants