From bb9562093ecf361bffff9546fa516a726a7a5323 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Wed, 10 Nov 2021 12:59:10 -0500 Subject: [PATCH] remove `this` fallback from node tests (cherry picked from commit 3ca842332a6d0d39b56093f7b58171d64f2e483b) --- tests/node/app-boot-test.js | 4 ++-- tests/node/component-rendering-test.js | 2 +- tests/node/visit-test.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/node/app-boot-test.js b/tests/node/app-boot-test.js index ae040dd4559..331e2b9126e 100644 --- a/tests/node/app-boot-test.js +++ b/tests/node/app-boot-test.js @@ -16,7 +16,7 @@ QUnit.module('App Boot', function (hooks) { this.template( 'components/root-component', "\ -

Hello {{#if hasExistence}}{{location}}{{/if}}

\ +

Hello {{#if this.hasExistence}}{{this.location}}{{/if}}

\
{{component 'foo-bar'}}
\ " ); @@ -57,7 +57,7 @@ QUnit.module('App Boot', function (hooks) { this.route('photos'); }); - this.template('application', '

{{{title}}}

'); + this.template('application', '

{{{this.title}}}

'); this.controller('application', { title: 'Hello world', }); diff --git a/tests/node/component-rendering-test.js b/tests/node/component-rendering-test.js index 2d23b4f9a90..c9398f3707f 100644 --- a/tests/node/component-rendering-test.js +++ b/tests/node/component-rendering-test.js @@ -12,7 +12,7 @@ QUnit.module('Components can be rendered without a DOM dependency', function (ho QUnit.test('Component with dynamic value', function (assert) { this.set('location', 'World'); - let html = this.render('

Hello {{location}}

'); + let html = this.render('

Hello {{this.location}}

'); assert.ok(html.match(/

Hello World<\/h1>/)); }); diff --git a/tests/node/visit-test.js b/tests/node/visit-test.js index 47452946ae1..18a89f6a38d 100644 --- a/tests/node/visit-test.js +++ b/tests/node/visit-test.js @@ -51,7 +51,7 @@ QUnit.module('Ember.Application - visit() Integration Tests', function (hooks) { this.template('application', '

Hello world

\n{{outlet}}'); this.template('a', '

Welcome to {{x-foo page="A"}}

'); this.template('b', '

{{x-foo page="B"}}

'); - this.template('components/x-foo', 'Page {{page}}'); + this.template('components/x-foo', 'Page {{this.page}}'); let initCalled = false; let didInsertElementCalled = false; @@ -135,7 +135,7 @@ QUnit.module('Ember.Application - visit() Integration Tests', function (hooks) { }); QUnit.test('FastBoot: attributes are sanitized', function (assert) { - this.template('application', ''); + this.template('application', ''); this.controller('application', { test: 'javascript:alert("hello")',