Skip to content

Commit 2ceb23e

Browse files
committed
Move reproduction tests to interactive module
1 parent f8444a3 commit 2ceb23e

File tree

1 file changed

+14
-12
lines changed
  • packages/@ember/-internals/glimmer/tests/integration/modifiers

1 file changed

+14
-12
lines changed

packages/@ember/-internals/glimmer/tests/integration/modifiers/on-test.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,20 @@ moduleFor(
242242

243243
this.assertCounts({ adds: 1, removes: 1 });
244244
}
245+
246+
[`@test it throws a helpful error when callback is undefined`](assert) {
247+
let expectedMessage = /You must pass a function as the second argument to the `on` modifier/;
248+
assert.throws(() => {
249+
this.render('<button {{on "click" undefined}}>Click Me</button>');
250+
}, expectedMessage);
251+
}
252+
253+
[`@test it throws a helpful error when callback is null`](assert) {
254+
let expectedMessage = /You must pass a function as the second argument to the `on` modifier/;
255+
assert.throws(() => {
256+
this.render('<button {{on "click" null}}>Click Me</button>');
257+
}, expectedMessage);
258+
}
245259
}
246260
);
247261

@@ -300,18 +314,6 @@ moduleFor(
300314
this.assertCounts({ adds: 0, removes: 0 });
301315
}
302316

303-
[`@test it throws a helpful error when callback is undefined`](assert) {
304-
let expectedMessage = /You must pass a function as the second argument to the `on` modifier/;
305-
assert.throws(() => {
306-
this.render('<button {{on "click" undefined}}>Click Me</button>');
307-
}, expectedMessage);
308-
}
309317

310-
[`@test it throws a helpful error when callback is null`](assert) {
311-
let expectedMessage = /You must pass a function as the second argument to the `on` modifier/;
312-
assert.throws(() => {
313-
this.render('<button {{on "click" null}}>Click Me</button>');
314-
}, expectedMessage);
315-
}
316318
}
317319
);

0 commit comments

Comments
 (0)