summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/test.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js
index e50ac76..44ab452 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,3 +1,13 @@
+test("ID required", function() {
+ expect(1);
+ try {
+ $("#test1 span").once();
+ }
+ catch (e) {
+ ok(e, "Error is triggered when ID is missing.");
+ }
+});
+
test(".once('test1-2') properly executed", function() {
// Create one once('test1-2') call.
$('#test1 span').once('test1-2').data('test1-2', 'foo');