Skip to content

Commit 0700d5e

Browse files
committed
Fixes broken test.
Not sure how I missed that.
1 parent d55b25f commit 0700d5e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

test/localize_test.coffee

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ do ($ = jQuery) ->
5858
t.localize("test", testOpts).localizePromise.then ->
5959
assert.equal t.val(), "input success"
6060

61-
test "input taasyncT value after second localization without key", (assert) ->
61+
asyncTest "input test value after second localization without key", (assert) ->
6262
t = localizableTagWithRel("input", "test.input", val: "input fail")
63+
d = $.Deferred()
6364
t.localize("test", testOpts).localizePromise.then ->
6465
t.localize("test2", testOpts).localizePromise.then ->
6566
assert.equal t.val(), "input success"
67+
d.resolve()
68+
d
6669

6770
asyncTest "input tag placeholder substitution", (assert) ->
6871
t = localizableTagWithRel("input", "test.input", placeholder: "placeholder fail")

test/localize_test.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,19 @@
9494
return assert.equal(t.val(), "input success");
9595
});
9696
});
97-
test("input taasyncT value after second localization without key", function(assert) {
98-
var t;
97+
asyncTest("input test value after second localization without key", function(assert) {
98+
var d, t;
9999
t = localizableTagWithRel("input", "test.input", {
100100
val: "input fail"
101101
});
102-
return t.localize("test", testOpts).localizePromise.then(function() {
102+
d = $.Deferred();
103+
t.localize("test", testOpts).localizePromise.then(function() {
103104
return t.localize("test2", testOpts).localizePromise.then(function() {
104-
return assert.equal(t.val(), "input success");
105+
assert.equal(t.val(), "input success");
106+
return d.resolve();
105107
});
106108
});
109+
return d;
107110
});
108111
asyncTest("input tag placeholder substitution", function(assert) {
109112
var t;

0 commit comments

Comments
 (0)