Skip to content

Commit 999d0e2

Browse files
authored
Move ci.yml to correct folder (#64)
* prettier fix for test * add gts to ignore for now * add missing semicolon
1 parent 941c700 commit 999d0e2

File tree

5 files changed

+52
-32
lines changed

5 files changed

+52
-32
lines changed
File renamed without changes.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type set from './helpers/set';
22

33
export default interface Registry {
4-
set: typeof set
4+
set: typeof set;
55
}

test-app/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/coverage/
99
!.*
1010
.*/
11+
*.gts
1112

1213
# ember-try
1314
/.node_modules.ember-try/

test-app/app/models/user.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
/* eslint-disable ember/no-classic-classes */
12
import EmberObject from '@ember/object';
23

34
export default EmberObject.extend({
4-
name: ''
5-
})
5+
name: '',
6+
});

test-app/tests/integration/helpers/set-test.js

+47-29
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { render, find, click, fillIn } from '@ember/test-helpers';
44
import hbs from 'htmlbars-inline-precompile';
55
import User from 'test-app/models/user';
66

7-
module('Integration | Helper | set', function(hooks) {
7+
module('Integration | Helper | set', function (hooks) {
88
setupRenderingTest(hooks);
99

10-
test('it works', async function(assert) {
10+
test('it works', async function (assert) {
1111
await render(hbs`
1212
<span data-test-greeting>{{this.greeting}}</span>
1313
@@ -16,14 +16,17 @@ module('Integration | Helper | set', function(hooks) {
1616
</button>
1717
`);
1818

19-
assert.equal(find('[data-test-greeting]').textContent.trim(), '');
19+
assert.strictEqual(find('[data-test-greeting]').textContent.trim(), '');
2020

2121
await click('button');
2222

23-
assert.equal(find('[data-test-greeting]').textContent.trim(), 'Hello!');
23+
assert.strictEqual(
24+
find('[data-test-greeting]').textContent.trim(),
25+
'Hello!',
26+
);
2427
});
2528

26-
test('it works on local paths', async function(assert) {
29+
test('it works on local paths', async function (assert) {
2730
this.person = {};
2831

2932
await render(hbs`
@@ -36,14 +39,14 @@ module('Integration | Helper | set', function(hooks) {
3639
{{/let}}
3740
`);
3841

39-
assert.equal(find('[data-test-greeting]').textContent.trim(), '');
42+
assert.strictEqual(find('[data-test-greeting]').textContent.trim(), '');
4043

4144
await click('button');
4245

43-
assert.equal(find('[data-test-greeting]').textContent.trim(), 'Liz');
46+
assert.strictEqual(find('[data-test-greeting]').textContent.trim(), 'Liz');
4447
});
4548

46-
test('it works with a dynamic path', async function(assert) {
49+
test('it works with a dynamic path', async function (assert) {
4750
this.set('path', 'greeting1');
4851

4952
await render(hbs`
@@ -55,19 +58,25 @@ module('Integration | Helper | set', function(hooks) {
5558
</button>
5659
`);
5760

58-
assert.equal(find('[data-test-greeting1]').textContent.trim(), '');
59-
assert.equal(find('[data-test-greeting2]').textContent.trim(), '');
61+
assert.strictEqual(find('[data-test-greeting1]').textContent.trim(), '');
62+
assert.strictEqual(find('[data-test-greeting2]').textContent.trim(), '');
6063

6164
await click('button');
62-
assert.equal(find('[data-test-greeting1]').textContent.trim(), 'Hello!');
65+
assert.strictEqual(
66+
find('[data-test-greeting1]').textContent.trim(),
67+
'Hello!',
68+
);
6369

6470
this.set('path', 'greeting2');
6571
await click('button');
6672

67-
assert.equal(find('[data-test-greeting2]').textContent.trim(), 'Hello!');
73+
assert.strictEqual(
74+
find('[data-test-greeting2]').textContent.trim(),
75+
'Hello!',
76+
);
6877
});
6978

70-
test('it works with a dynamic path on a nested object', async function(assert) {
79+
test('it works with a dynamic path on a nested object', async function (assert) {
7180
this.set('path', 'greeting1');
7281
this.set('obj', {});
7382

@@ -80,20 +89,26 @@ module('Integration | Helper | set', function(hooks) {
8089
</button>
8190
`);
8291

83-
assert.equal(find('[data-test-greeting1]').textContent.trim(), '');
84-
assert.equal(find('[data-test-greeting2]').textContent.trim(), '');
92+
assert.strictEqual(find('[data-test-greeting1]').textContent.trim(), '');
93+
assert.strictEqual(find('[data-test-greeting2]').textContent.trim(), '');
8594

8695
await click('button');
8796

88-
assert.equal(find('[data-test-greeting1]').textContent.trim(), 'Hello!');
97+
assert.strictEqual(
98+
find('[data-test-greeting1]').textContent.trim(),
99+
'Hello!',
100+
);
89101

90102
this.set('path', 'greeting2');
91103
await click('button');
92104

93-
assert.equal(find('[data-test-greeting2]').textContent.trim(), 'Hello!');
105+
assert.strictEqual(
106+
find('[data-test-greeting2]').textContent.trim(),
107+
'Hello!',
108+
);
94109
});
95110

96-
test('it works with a dynamic path on a component argument', async function(assert) {
111+
test('it works with a dynamic path on a component argument', async function (assert) {
97112
this.set('path', 'greeting1');
98113
this.set('obj', {});
99114

@@ -103,29 +118,29 @@ module('Integration | Helper | set', function(hooks) {
103118

104119
await click('button');
105120

106-
assert.equal(this.obj.greeting1, 42);
121+
assert.strictEqual(this.obj.greeting1, 42);
107122

108123
this.set('path', 'greeting2');
109124
await click('button');
110125

111-
assert.equal(this.obj.greeting2, 42);
126+
assert.strictEqual(this.obj.greeting2, 42);
112127
});
113128

114-
test('it works without a value', async function(assert) {
129+
test('it works without a value', async function (assert) {
115130
await render(hbs`
116131
<span data-test-count>{{this.count}}</span>
117132
<Counter @onUpdate={{set this "count"}} />
118133
`);
119134

120-
assert.equal(find('[data-test-count]').textContent.trim(), '');
135+
assert.strictEqual(find('[data-test-count]').textContent.trim(), '');
121136

122137
await click('button');
123138
await click('button');
124139

125-
assert.equal(find('[data-test-count]').textContent.trim(), '2');
140+
assert.strictEqual(find('[data-test-count]').textContent.trim(), '2');
126141
});
127142

128-
test('it works without a value on an object', async function(assert) {
143+
test('it works without a value on an object', async function (assert) {
129144
this.set('user', User.create({ name: 'Alice' }));
130145
await render(hbs`
131146
<span data-test-name>{{this.user.name}}</span>
@@ -139,17 +154,20 @@ module('Integration | Helper | set', function(hooks) {
139154
assert.dom('[data-test-name]').hasText('Bob');
140155
});
141156

142-
test('can pick a value using {{pick}} from ember-composable-helpers', async function(assert) {
157+
test('can pick a value using {{pick}} from ember-composable-helpers', async function (assert) {
143158
await render(hbs`
144159
<span data-test-greeting>{{this.greeting}}</span>
145160
146-
<input {{on "input" (pick "target.value" (set this "greeting"))}}>
161+
<input aria-label={{this.greeting}} {{on "input" (pick "target.value" (set this "greeting"))}}>
147162
`);
148163

149-
assert.equal(find('[data-test-greeting]').textContent.trim(), '');
164+
assert.strictEqual(find('[data-test-greeting]').textContent.trim(), '');
150165

151166
await fillIn('input', 'Hello!');
152167

153-
assert.equal(find('[data-test-greeting]').textContent.trim(), 'Hello!');
168+
assert.strictEqual(
169+
find('[data-test-greeting]').textContent.trim(),
170+
'Hello!',
171+
);
154172
});
155-
});
173+
});

0 commit comments

Comments
 (0)