GithubHelp home page GithubHelp logo

jasminesnippetpack's Introduction

Jasmine Snippet Pack for Visual Studio

Build status

Download this extension from the VS Gallery or get the nightly build.


A snippet pack to make you more productive working with the Jasmine test library.

This extension contains code snippets for Jasmine test framework and is based on the awesome sublime-jasmine package by @NicoSantangelo.

Snippets demo

This extension ships a bunch of useful code snippets for the JavaScript editor. Get an overview from the Code Snippet Manager in Visual Studio located under the Tools top level menu.

Snippet manager

Snippets

Below is a list of all snippets currently supported on this package and the triggers of each one. The means the TAB key.

Specs

  • describe: desc⇥
  • xdescribe: xdesc⇥
  • fdescribe: fdesc⇥
  • it: it⇥
  • itd: itd⇥
  • xit: xit⇥
  • fit: fit⇥
  • afterEach: ae⇥
  • beforeEach: be⇥

Expectations

  • expect: exp⇥
  • expect().toBe: tb⇥
  • expect().toBeCloseTo: tbct⇥
  • expect().toBeDefined: tbd⇥
  • expect().toBeFalsy: tbf⇥
  • expect().toBeGreaterThan: tbgt⇥
  • expect().toBeLessThan: tblt⇥
  • expect().toBeNull: tbn⇥
  • expect().toBeTruthy: tbt⇥
  • expect().toBeUndefined: tbu⇥
  • expect().toContain: tc⇥
  • expect().toEqual: te⇥
  • expect().toHaveBeenCalled: thbc⇥
  • expect().toHaveBeenCalledWith: thbcw⇥
  • expect().toMatch: tm⇥
  • expect().toThrow: tt⇥
  • expect().toThrowError: tte⇥
  • expect().not.toBe: nb⇥
  • expect().not.toBeCloseTo: nct⇥
  • expect().not.toBeDefined: nd⇥
  • expect().not.toBeFalsy: nf⇥
  • expect().not.toBeGreaterThan: ngt⇥
  • expect().not.toBeLessThan: nlt⇥
  • expect().not.toBeNull: nn⇥
  • expect().not.toBeTruthy: nt⇥
  • expect().not.toBeUndefined: nu⇥
  • expect().not.toContain: nc⇥
  • expect().not.toEqual: ne⇥
  • expect().not.toMatch: nm⇥
  • expect().not.toThrow: nt⇥
  • jasmine.any: any⇥
  • jasmine.objectContaining: oc⇥

Spies

  • spyOn: so⇥
  • spyOn.and.callThrough: sct⇥
  • spyOn.and.callFake: scf⇥
  • spyOn.and.returnValue: srv⇥
  • spyOn.and.stub: ss⇥
  • spyOn.and.throwError: ste⇥
  • spy.calls.all: ca⇥
  • spy.calls.allArgs: caa⇥
  • spy.calls.any: ca⇥
  • spy.calls.argsFor: caf⇥
  • spy.calls.count: cc⇥
  • spy.calls.first: cf⇥
  • spy.calls.mostRecent: cmr⇥
  • spy.calls.reset: cr⇥
  • createSpy: cs⇥
  • createSpyObj: cso⇥

Contribute

Check out the contribution guidelines if you want to contribute to this project.

For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.

License

Apache 2.0

jasminesnippetpack's People

Contributors

madskristensen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jasminesnippetpack's Issues

Missing or unspecified Language attribute for TypeScript snippets

Installed product versions

  • Visual Studio: 2017 Pro (15.4)
  • This extension: 1.2.23

Description

Several of the TS snippets in this extension are emitting the warning Missing or unspecified Language attribute in the Code Snippet Output window in VS:

C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\spyOnAndCallFake.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\describe.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\xDescribe.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\itd.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\it.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\beforeEach.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\focusDescribe.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\afterEach.snippet: Missing or unspecified Language attribute
C:\Users\...\AppData\Local\Microsoft\VisualStudio\15.0_b17551d6\Extensions\2d0b3hsn.n3g\Snippets\JasmineSnippetPack-TS\focusedIt.snippet: Missing or unspecified Language attribute

Current behavior

Warnings are emitted in the Code Snippet Window due to the "missing" @Language attribute.

Expected behavior

The warnings are not emitted.

What's strange, though, is that there is a @Language attribute on all of those code snippets! Hmm, and doing some more searching, what's even stranger is that these TypeScript snippets are not showing up in the Code Snippets Manager in Visual Studio, as per #4! So I'm wondering if this issue with the @Language attribute is what's ultimately behind #4?

Not seeing the TS snippets

Installed product versions

  • Visual Studio: 2017 Enterprise
  • This extension: 1.2.9

Description

My VS wasn't auto updating the extension, so I just tried this out today. I'm not seeing the TS snippets added in my PR #2.

image

They also do not work in a TypeScript file or a JavaScript file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.