1
0
Fork 0

Removed test setter

This commit is contained in:
Ava Wroten 2020-03-15 19:58:34 -05:00
parent 1481bed98d
commit d21579681c

View file

@ -2,16 +2,15 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, triggerKeyEvent } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { set } from '@ember/object';
module('Integration | Modifier | key-up', function(hooks) {
setupRenderingTest(hooks);
test('it fires off a function when a key is pressed, passing the event along with it', async function(assert) {
set(this, 'keyUp', ({ key }) => {
this.keyUp = ({ key }) => {
assert.step('key up');
assert.equal(key, 'Enter');
});
};
await render(hbs`
<div {{key-up this.keyUp}}
@ -24,10 +23,10 @@ module('Integration | Modifier | key-up', function(hooks) {
});
test('it can listen for a specific key', async function(assert) {
set(this, 'keyUp', ({ key }) => {
this.keyUp = ({ key }) => {
assert.step('enter key up');
assert.equal(key, 'Enter');
});
};
await render(hbs`
<div {{key-up this.keyUp key="Enter"}}