22
Teste seu Javascript se não quiser uma macarronada para o jantar Dyego Costa

Teste seu javascript se não quiser uma macarronada para o jantar

Embed Size (px)

Citation preview

Teste seu Javascript se não quiser uma

macarronada para o jantarDyego Costa

@dyegoscosta

Desenvolvedor

Microsoft Student Partner

http://dyegoCOMy.com

@VCavalcante

@GiovanniBassi

A nova web

Manifesto da nova web

Menos C#/Ruby/Java/Python, mais Javascript

Menos arrastar e soltar, mais HTML codificado à mão

Menos poluição no HTML, mais CSS

Menos uso do HTML para design, mais foco na

semântica

Mais Javascript, mais opções de Javascript

Single Page Application

Ferramentas

github.com/pivotal/jasminegithub.com/jquery/qunit

github.com/nkallen/screw-unit

github.com/wycats/jspec

github.com/pivotal/jsunit

tryjasmine.com

Spies

github.com/velesin/jasmine-jquery

• toBe(jQuerySelector)• toBeChecked()• toBeEmpty()• toBeHidden()• toHaveCss(css)• toBeSelected()• toBeVisible()• toContain(jQuerySelector)• toHaveAttr(attributeName, attributeValue)• toHaveProp(propertyName, propertyValue)• toHaveBeenTriggeredOn(selector)

• toHaveBeenTriggered()• toHaveBeenPreventedOn(selector)• toHaveBeenPrevented()• toHaveClass(className)• toHaveData(key, value)• toHaveHtml(string)• toContainHtml(string)• toHaveId(id)• toHaveText(string)• toHaveValue(value)• toBeDisabled()• toBeFocused()• toHandle(eventName)• toHandleWith(eventName, eventHandler)

Cache Cuidado!

Chutzpah+

Phantom.js

Demo

https://github.com/DyegoCosta/SPA

Obrigado!

@[email protected]

dyegocomy.com