Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished linking interface with pub/sub; starting unit tests
- Loading branch information
Showing
8 changed files
with
146 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(function () { | ||
/** | ||
* Ensures that tests have cleaned up properly after themselves. Should be passed as the | ||
* teardown function on all modules' lifecycle object. | ||
*/ | ||
this.moduleTeardown = function () { | ||
// Allow QUnit.reset to clean up any attached elements before checking for leaks | ||
QUnit.reset(); | ||
|
||
// clear out subscriptions | ||
//Stitches._topics = {}; | ||
} | ||
}()); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module("main", {teardown: moduleTeardown}); | ||
|
||
test("Basic requirements", function() { | ||
expect(4); | ||
ok( window, "window" ); | ||
ok( Stitches, "Stitches" ); | ||
ok( jQuery, "jQuery" ); | ||
ok( $, "$" ); | ||
}); | ||
|
||
test("Stitches.init()", function () { | ||
expect(2); | ||
|
||
equal( typeof Stitches.init, "function" ); | ||
equal( Stitches.init.length, 2 ); | ||
}); | ||
|
||
// for now, do the init method here | ||
$(function ($) { | ||
var $elem = $("#stitches"); | ||
Stitches.init($elem, {jsdir: "../src"}); | ||
}); |