Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
vue-test-utils
Advanced tools
When test Vue.js
project, you probably need some kind of thing to check the
DOM, or trigger events to check if the component work correctly. Of course, jQuery
is your friend, but it add so many feature that you do not need.
This utils currently only provided three functions to help you test your program.
Just like the $
funciton in jQuery, except that it is bound to the Rel
element.
Then you can do this:
const vm = new Vue(...);
vm.$('some-element');
The $
function is just a proxy to querySelector
, but this function is proxied
to querySelectorAll
, so it returns a NodeList
.
This combines the $
function with a simple event trigger which is brought from
the elegant, small but power full JS library: blissfuljs. Then you can:
const vm = new Vue(...);
vm.$fire('some-element', 'click');
// or with event options
vm $fire('some-element', 'click', { ctrlKey: true });
Although they are just simple proxy functions that are easy to create, they extremely improved your productivity, trust me ^_^.
FAQs
Utilities for testing Vue components.
The npm package vue-test-utils receives a total of 4,329 weekly downloads. As such, vue-test-utils popularity was classified as popular.
We found that vue-test-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.