-
Notifications
You must be signed in to chang 8000 e notification settings - Fork 4.1k
Test client
Scott Erickson edited this page Mar 10, 2016
·
1 revision
You want to write tests for the client (in app/
) code you're writing.
Add a spec
file to test/app
which mirrors the location of the file being tested (test/app/views/FooView.spec.coffee
for app/views/FooView.coffee
). Use jasmine and jasmine-ajax to write your tests and mock network requests. Your test can be run at http://localhost:3000/test when running the dev environment.
Since TestView.coffee is simply another view in the site, it behaves like any other: it reloads whenever a file changes. Use this for fast code-test iteration!
We run a slightly altered version of jasmine-ajax, which includes functions all
and sendResponses
. See vendor/scripts/jasmine-mock-ajax.js.
CodeCombat | Home | Blog | Forum | Teachers | Legal | Contribute
- Home
- Archmage Home
- Artisan Home
- Diplomat Home
- Archmage General
- Mission statement
- Coco Models
- Coding Guidelines
- Cookbook
- File system
- JSON Schema
- Technical overview
- Testing
- Third party software and services
- Artisan General
- Building A Level
- Coding Guidelines for Artisans
- Editing Thang Components
- Important Artisan Concepts
- Keyboard Shortcuts
- Debugging
- Artisan How-To Index
- Diplomat General
- i18n
- i18n Glossary nb
- i18n Glossary ru
- i18n Glossary es-419
- Dev Setup
- Dev Setup: Linux
- Dev Setup: Windows
- Dev Setup: Mac
- Dev Setup: Vagrant
- Dev Setup: Issues
- Game Engine
- Component
- Multiplayer
- Surface
- System
- Thang
- Thang Component System
- Tome
- World
- Artisan Tabs
- Components And Systems
- Scripts
- Settings
- Thangs
- Other
- Aether
- Client models
- Developer organization
- Educational Standards
- Events, subscriptions, shortcuts
- Chat Room
- Chat Room Rules
- Permissions
- Project Ideas List
- Treema
- Versioning
- Views