-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathfind.input.js
More file actions
28 lines (23 loc) · 875 Bytes
/
find.input.js
File metadata and controls
28 lines (23 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
moduleForAcceptance('find');
test('anonymous function callback with two args', function(assert) {
const elemIds = find('.button-class').find((index, element) => {
assert.equal(element.id, `button${index}`);
});
});
test('anonymous function callback with one arg', function(assert) {
const elemIds = find('.button-class').find((index) => {
assert.equal(element.id, `button${index}`);
});
});
test('function callback with two args', function(assert) {
const elemIds = find('.button-class').find(function(i, elem) {
assert.equal(element.id, `button${index}`);
});
});
test('function callback with one arg', function(assert) {
const elemIds = find('.button-class').find((index) => {
assert.equal(element.id, `button${index}`);
});
});