From fbb401c231baa04b988bbd01ece7ab4e88f24a0c Mon Sep 17 00:00:00 2001 From: Melanie Sumner Date: Thu, 8 Feb 2024 11:45:44 -0600 Subject: [PATCH 1/4] there and back again --- .github/{ => workflows}/ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/ci.yml (100%) diff --git a/.github/ci.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/ci.yml rename to .github/workflows/ci.yml From 53a5fb7005951d1a7617f6f4bce6761b06d6b4a3 Mon Sep 17 00:00:00 2001 From: Melanie Sumner Date: Thu, 8 Feb 2024 11:53:56 -0600 Subject: [PATCH 2/4] prettier fix for test --- .../tests/integration/helpers/set-test.js | 76 ++++++++++++------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/test-app/tests/integration/helpers/set-test.js b/test-app/tests/integration/helpers/set-test.js index c28e87c..4b5421f 100644 --- a/test-app/tests/integration/helpers/set-test.js +++ b/test-app/tests/integration/helpers/set-test.js @@ -4,10 +4,10 @@ import { render, find, click, fillIn } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import User from 'test-app/models/user'; -module('Integration | Helper | set', function(hooks) { +module('Integration | Helper | set', function (hooks) { setupRenderingTest(hooks); - test('it works', async function(assert) { + test('it works', async function (assert) { await render(hbs` {{this.greeting}} @@ -16,14 +16,17 @@ module('Integration | Helper | set', function(hooks) { `); - assert.equal(find('[data-test-greeting]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting]').textContent.trim(), ''); await click('button'); - assert.equal(find('[data-test-greeting]').textContent.trim(), 'Hello!'); + assert.strictEqual( + find('[data-test-greeting]').textContent.trim(), + 'Hello!', + ); }); - test('it works on local paths', async function(assert) { + test('it works on local paths', async function (assert) { this.person = {}; await render(hbs` @@ -36,14 +39,14 @@ module('Integration | Helper | set', function(hooks) { {{/let}} `); - assert.equal(find('[data-test-greeting]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting]').textContent.trim(), ''); await click('button'); - assert.equal(find('[data-test-greeting]').textContent.trim(), 'Liz'); + assert.strictEqual(find('[data-test-greeting]').textContent.trim(), 'Liz'); }); - test('it works with a dynamic path', async function(assert) { + test('it works with a dynamic path', async function (assert) { this.set('path', 'greeting1'); await render(hbs` @@ -55,19 +58,25 @@ module('Integration | Helper | set', function(hooks) { `); - assert.equal(find('[data-test-greeting1]').textContent.trim(), ''); - assert.equal(find('[data-test-greeting2]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting1]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting2]').textContent.trim(), ''); await click('button'); - assert.equal(find('[data-test-greeting1]').textContent.trim(), 'Hello!'); + assert.strictEqual( + find('[data-test-greeting1]').textContent.trim(), + 'Hello!', + ); this.set('path', 'greeting2'); await click('button'); - assert.equal(find('[data-test-greeting2]').textContent.trim(), 'Hello!'); + assert.strictEqual( + find('[data-test-greeting2]').textContent.trim(), + 'Hello!', + ); }); - test('it works with a dynamic path on a nested object', async function(assert) { + test('it works with a dynamic path on a nested object', async function (assert) { this.set('path', 'greeting1'); this.set('obj', {}); @@ -80,20 +89,26 @@ module('Integration | Helper | set', function(hooks) { `); - assert.equal(find('[data-test-greeting1]').textContent.trim(), ''); - assert.equal(find('[data-test-greeting2]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting1]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting2]').textContent.trim(), ''); await click('button'); - assert.equal(find('[data-test-greeting1]').textContent.trim(), 'Hello!'); + assert.strictEqual( + find('[data-test-greeting1]').textContent.trim(), + 'Hello!', + ); this.set('path', 'greeting2'); await click('button'); - assert.equal(find('[data-test-greeting2]').textContent.trim(), 'Hello!'); + assert.strictEqual( + find('[data-test-greeting2]').textContent.trim(), + 'Hello!', + ); }); - test('it works with a dynamic path on a component argument', async function(assert) { + test('it works with a dynamic path on a component argument', async function (assert) { this.set('path', 'greeting1'); this.set('obj', {}); @@ -103,29 +118,29 @@ module('Integration | Helper | set', function(hooks) { await click('button'); - assert.equal(this.obj.greeting1, 42); + assert.strictEqual(this.obj.greeting1, 42); this.set('path', 'greeting2'); await click('button'); - assert.equal(this.obj.greeting2, 42); + assert.strictEqual(this.obj.greeting2, 42); }); - test('it works without a value', async function(assert) { + test('it works without a value', async function (assert) { await render(hbs` {{this.count}} `); - assert.equal(find('[data-test-count]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-count]').textContent.trim(), ''); await click('button'); await click('button'); - assert.equal(find('[data-test-count]').textContent.trim(), '2'); + assert.strictEqual(find('[data-test-count]').textContent.trim(), '2'); }); - test('it works without a value on an object', async function(assert) { + test('it works without a value on an object', async function (assert) { this.set('user', User.create({ name: 'Alice' })); await render(hbs` {{this.user.name}} @@ -139,17 +154,20 @@ module('Integration | Helper | set', function(hooks) { assert.dom('[data-test-name]').hasText('Bob'); }); - test('can pick a value using {{pick}} from ember-composable-helpers', async function(assert) { + test('can pick a value using {{pick}} from ember-composable-helpers', async function (assert) { await render(hbs` {{this.greeting}} - + `); - assert.equal(find('[data-test-greeting]').textContent.trim(), ''); + assert.strictEqual(find('[data-test-greeting]').textContent.trim(), ''); await fillIn('input', 'Hello!'); - assert.equal(find('[data-test-greeting]').textContent.trim(), 'Hello!'); + assert.strictEqual( + find('[data-test-greeting]').textContent.trim(), + 'Hello!', + ); }); -}); \ No newline at end of file +}); From af4c7da51cfe04ae5494b6ce2c4ad40ba023aeca Mon Sep 17 00:00:00 2001 From: Melanie Sumner Date: Thu, 8 Feb 2024 11:56:39 -0600 Subject: [PATCH 3/4] add gts to ignore for now --- test-app/.eslintignore | 1 + test-app/app/models/user.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test-app/.eslintignore b/test-app/.eslintignore index 9385391..f4beef3 100644 --- a/test-app/.eslintignore +++ b/test-app/.eslintignore @@ -8,6 +8,7 @@ /coverage/ !.* .*/ +*.gts # ember-try /.node_modules.ember-try/ diff --git a/test-app/app/models/user.js b/test-app/app/models/user.js index f95007c..522e46d 100644 --- a/test-app/app/models/user.js +++ b/test-app/app/models/user.js @@ -1,5 +1,6 @@ +/* eslint-disable ember/no-classic-classes */ import EmberObject from '@ember/object'; export default EmberObject.extend({ - name: '' -}) + name: '', +}); From 9baffd8172872efa9c83861a83d8bfe0c1f3659e Mon Sep 17 00:00:00 2001 From: Melanie Sumner Date: Thu, 8 Feb 2024 11:59:12 -0600 Subject: [PATCH 4/4] add missing semicolon --- ember-set-helper/src/template-registry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ember-set-helper/src/template-registry.ts b/ember-set-helper/src/template-registry.ts index 834bd6f..dcc5049 100644 --- a/ember-set-helper/src/template-registry.ts +++ b/ember-set-helper/src/template-registry.ts @@ -1,5 +1,5 @@ import type set from './helpers/set'; export default interface Registry { - set: typeof set + set: typeof set; }