sdras/vue-vscode-snippets

Test snippets

Roninii opened this issue · 1 comments

I'm just curious if you feel as though snippets directed at test files are out of the scope of this extension? I thought about making a separate extension, but I figured we could just add on to this one if you feel it's within the same scope?

i.e. using @testing-library/vue:

import { render } from '@testing-library/vue'
import MyComponent from '@/components/MyComponent.vue'

descibe('', () => {
    it('', () => {
        //... test...
    })
})

Why:

  • User generated snippets can't be scoped by file extensions like *.spec.js.
  • We should all probably write more tests, and testing boiler plate is obnoxious.

Edit: I should note that I bring this up because I'm willing to create some snippets. Just wondered if the interest was there :D

sdras commented

Hm. It's tough to say because I agree with you, it would be nice to have but I don't know if I want to cover every testing library out there. I'll take a PR for this one because it's generic enough to be useful for a few cases. Sound good?