Code Monkey home page Code Monkey logo

jetbrains-livetpls-jasmine's Introduction

webstorm-livetpls-jasmine

Embed live templates for jasmine (behavior-driven development framework for testing JavaScript code)

Contributors

Feel free to purpose a Merge Request to improve this tools!

Installation

System Location
windows C:\Users\Administrator\.WebStorm8\config\templates
linux ~.[product name][version number]\config\templates
mac ~/Library/Preferences/[product name][version number]/templates

Documentation

These live templates was made for Jasmine testing framework.

List of available jasmine Live Templates

  • jasd: Jasmine describe template
  • jasb: beforeEach
  • jasa: afterEach
  • it: Jasmine it template
  • jasbi: beforeEach with Angular's inject
  • jasbm: beforEach with AngularJS module
  • iit: Jasmine it template with injectables
  • jasctrl: Jasmine describe controller
  • jasdir: Jasmine describe directive
  • jasf: Jasmine describe filter
  • jass: Jasmine describe service
  • expectbe: Expect(X).toBe(Y)
  • expectnotbe: Expect(X).not.toBe(Y)
  • expectequal: Expect(X).toEqual(Y)
  • expectmatch: Expect(X).toMatch(Y)
  • expectnotmatch: Jasmine Expect(X).not.toMatch(Y)
  • expectdefined: Expect(X).toBeDefined()
  • expectundefined: Expect(X).toBeUndefined()
  • expectnotundefined: Expect(X).toBeUndefined()
  • expectnotdefined: Jasmine expect().not.toBeDefined()
  • expectnull: Expect(X).toBeNull()
  • expectnotnull: Expect(X).not.toBeNull()
  • expecttrue: Expect(X).toBeTruthy(Y)
  • expectfalse: Expect(X).toBeFalsy(Y)
  • expectnotfalse: Expect(X).not.toBeFalsy(Y)
  • expectnottrue: Expect(X).not.toBeTruthy(Y)
  • expectcontain: Expect(X).toContain(Y)
  • expectnotcontain: Expect(X).not.toContain(Y)
  • expectlessthan: Expect(X).toBeLessThan(Y)
  • expectgeaterthan: Expect(X).toBeGreaterThan(Y)
  • expectcloseto: Expect(X).toBeCloseTo(Y, Z)
  • expectthrow: Expect(X).toThrow()
  • expectnotthrow: Expect(X).not.toThrow()
  • expecthavebeencalled: Expect(X).toHaveBeenCalled()
  • expecthavebeencalledwith: Expect(X).toHaveBeenCalledWith(Y)
  • expectnumber: expect(X).toEqual(jasmine.any(Number))
  • expectarray: expect(X).toEqual(jasmine.any(Array))
  • expectfunc: expect(X).toEqual(jasmine.any(Function))
  • expectobj: expect(X).toEqual(jasmine.any(Object))
  • expectstr: expect(X).toEqual(jasmine.any(String))
  • expectobjcontain: expect(X).toEqual(jasmine.objectContaining({}))
  • createspy: jasmine.createSpy(Key)
  • createspyobj: jasmine.createspyobj(Key, Array)
  • spyon: spyOn(Obj, Key)
  • spyonthrough: spyOn(Obj, Key).andCallThrough()
  • spyonreturn: spyOn(Obj, Key).andReturn()
  • spyoncallfake: spyOn(Obj, Key).andCallFake(fct)

List of available jasmine-ajax Live Templates

  • ajaxins: jasmine.Ajax.install()
  • ajaxuni: jasmine.Ajax.uninstall()
  • ajaxreqres: jasmine.Ajax.requests.mostRecent().response(ResponseText)
  • ajaxreqstub: jasmine.Ajax.stubRequest(Url).andReturn(ResponseText)
  • ajaxmock: jasmine.Ajax.withMock(function(){})

List of available jasmine-jquery Live Templates

  • loadpath: jasmine.getFixtures().fixturesPath
  • loadJSONpath: jasmine.getJSONFixtures().fixturesPath
  • jasload: jasmine.getFixtures().load()
  • jasappendload: jasmine.getFixtures().appendLoad()
  • jasread: jasmine.getFixtures().read()
  • jasset: jasmine.getFixtures().set()
  • jasappendset: jasmine.getFixtures().appendSet()
  • jaspreload: jasmine.getFixtures().preload()
  • jassandbox: jasmine.getFixtures().sandbox({})
  • jasclear: jasmine.getFixtures().clearCache()
  • jasclean: jasmine.getFixtures().cleanUp()
  • jasJSONload: jasmine.getJSONFixtures().load()
  • jasJSONget: jasmine.getJSONFixtures().get()

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.