Collection of helper methods regarding to Deferred and Promises. Inpired from 'Learning jQuery Deferred' book.
├── doc
├── lib
│ ├── jasmine-2.2.0
│ ├── requirejs
│ └── sinon
└── src
├── main
└── test
└── spec
- JS main source is in
src/main/
- Third-parties are in
lib
- Test source (aka spec files) are in
src/test/spec
. There are 2 ways to run tests:- open this file
src/test/spec/SpecRunner.html
, or - running
karma start
command.
- open this file
- If you want add more test files, you need to modify
src/test/jasmine-boot.js
, example:
$(document).ready(function () {
var specs = [];
// add spec files here.
specs.push('spec/wait.spec');
specs.push('spec/getDeferredFromPromise.spec');
require(specs, function () {
htmlReporter.initialize();
env.execute();
});
});
src/test/test-main.js
is a RequireJS configuration for Karma test runner. Configuration for browser test runner is insidesrc/test/spec/SpecRunner.html
- jQuery: almose codes are based on jQuery Deferred.
- Jasmine: testing framework
- Karma: test runner
- JS module pattern: UMD
- RequireJS: a main loader for JS modules in browsers and test runner
- Gulp: a build tool.
All contributions are welcome!. If you need any helps, please submit a issue/question here.
Copyright (c) 2015 Assemble Released under the MIT License.