Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test to check types loaded from DOM

  • Loading branch information...
commit 253b001ac204538edb9d43f09505fef6d5a8b9e4 1 parent 24003f7
@lilspikey authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/moot-tests.js
View
6 tests/moot-tests.js
@@ -135,6 +135,12 @@ test("animation backed by span inside sprite div", function() {
var sprite_elem = sprite.elem();
equals(sprite_elem.find('span.animation-class').get(0), animation_elem.get(0), 'sprite div contains animation span');
});
+test("sprite types loaded from DOM", function() {
+ var world_elem = $('<div>');
+ var world = Moot.world(world_elem);
+ var sprite = world.create_sprite($('<div id="main-sprite" class="my-type"></div>'));
+ ok('my-type' in sprite.types(), "sprite has type from DOM");
+});
module("Animation")
test("frame updates class", function() {
Please sign in to comment.
Something went wrong with that request. Please try again.