@@ -144,15 +144,9 @@ hbsRuleTester.run('template-no-trailing-spaces', rule, {
144144 valid : [
145145 'test' ,
146146 ' test' ,
147- `test
148- ` ,
149- `
150- ` ,
151- ` test
152- ` ,
153- `{{#my-component}}
154- test
155- {{/my-component}}` ,
147+ 'test\n' ,
148+ 'test\n' + '\n' ,
149+ '{{#my-component}}\n' + ' test\n' + '{{/my-component}}' ,
156150 `import { hbs } from 'ember-cli-htmlbars';
157151
158152test('it renders', async (assert) => {
@@ -177,55 +171,23 @@ test('it renders', async (assert) => {
177171 errors : [ { message : 'Trailing whitespace detected.' } ] ,
178172 } ,
179173 {
180- code : `import { hbs } from 'ember-cli-htmlbars';
181-
182- test('it renders', async (assert) => {
183- await render(hbs\`
184- <div class="parent">
185- <div class="child"></div>
186- </div>
187- \`);
188- });` ,
189- output : `import { hbs } from 'ember-cli-htmlbars';
190-
191- test('it renders', async (assert) => {
192- await render(hbs\`
193- <div class="parent">
194- <div class="child"></div>
195- </div>
196- \`);
197- });` ,
174+ code : 'test\n \n' ,
175+ output : 'test\n\n' ,
198176 errors : [ { message : 'Trailing whitespace detected.' } ] ,
199177 } ,
200178 {
201- code : `import { hbs } from 'ember-cli-htmlbars';
202-
203- test('it renders', async (assert) => {
204- await render(hbs\`
205- <div></div>
206-
207- <div></div>
208- \`);
209- });` ,
210- output : `import { hbs } from 'ember-cli-htmlbars';
211-
212- test('it renders', async (assert) => {
213- await render(hbs\`
214- <div></div>
215-
216- <div></div>
217- \`);
218- });` ,
179+ code : '{{#my-component}}\n test \n{{/my-component}}' ,
180+ output : '{{#my-component}}\n test\n{{/my-component}}' ,
219181 errors : [ { message : 'Trailing whitespace detected.' } ] ,
220182 } ,
221183 {
222- code : 'test\n \n' ,
223- output : 'test \n\n' ,
184+ code : "import { hbs } from 'ember-cli-htmlbars';\n\ntest('it renders', async (assert) => {\n await render(hbs` \n <div class=\"parent\">\n <div class=\"child\"></div>\n </div>\n `);\n});" ,
185+ output : "import { hbs } from 'ember-cli-htmlbars'; \n\ntest('it renders', async (assert) => {\n await render(hbs`\n <div class=\"parent\">\n <div class=\"child\"></div>\n </div>\n `);\n});" ,
224186 errors : [ { message : 'Trailing whitespace detected.' } ] ,
225187 } ,
226188 {
227- code : '{{#my-component}}\n test \n{{/my-component}}' ,
228- output : '{{#my-component}}\n test\n{{/my-component}}' ,
189+ code : "import { hbs } from 'ember-cli-htmlbars';\n\ntest('it renders', async (assert) => {\n await render(hbs`\n <div></div>\n \n <div></div>\n `);\n});" ,
190+ output : "import { hbs } from 'ember-cli-htmlbars';\n\ntest('it renders', async (assert) => {\n await render(hbs`\n <div></div>\n\n <div></div>\n `);\n});" ,
229191 errors : [ { message : 'Trailing whitespace detected.' } ] ,
230192 } ,
231193 ] ,
0 commit comments