Last active
December 14, 2015 01:19
-
-
Save jackysee/5005089 to your computer and use it in GitHub Desktop.
sample jasmine test with squire
This file contains hidden or 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
//spec/a_spec.js | |
define(['lib/Squire', 'jquery'], function(Squire, $){ | |
describe("a", function() { | |
var a; | |
beforeEach(function(){ | |
var done = false; | |
runs(function () { | |
new Squire() | |
//.mock(...) | |
.require(['components/a'], function (aa){ | |
a = aa; | |
done = true; | |
}); | |
}); | |
waitsFor(function(){ | |
return done; | |
}); | |
}); | |
it("should be defined", function() { | |
expect(a).toBeDefined(); | |
}); | |
it("plugin should be defined", function(){ | |
expect($.fn.aaa).toBeDefined(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment