Repository navigation
Cleanup ember-template-compiler's tests - #16010
Merged
rwjblue merged 1 commit intoDec 27, 2017
Merged
Conversation
karthiicksiva
force-pushed
the
cleanup_ember_template_compiler
branch
from
December 19, 2017 17:39
f9cdcb8 to
1e0128e
Compare
thoov
reviewed
Dec 19, 2017
| QUnit.module('ember-template-compiler: assert-input-helper-without-block'); | ||
| moduleFor('ember-template-compiler: assert-input-helper-without-block', class extends AbstractTestCase { | ||
| ['@test Using {{#input}}{{/input}} is not valid'](assert) { | ||
| assert.expect(1); |
Member
There was a problem hiding this comment.
Most of the time we can get rid of assert.expect(1) and I believe we can in these test cases. We will want to keep the assert.expect(0) however
karthiicksiva
force-pushed
the
cleanup_ember_template_compiler
branch
from
December 21, 2017 14:34
1e0128e to
48c2557
Compare
Contributor
Author
|
@thoov I am not sure about how to move this? Any idea? //cc @rwjblue |
Member
|
@Karthiick There are a few approaches I can think of but this is what first pops to mind: if (EMBER_GLIMMER_NAMED_ARGUMENTS) {
moduleFor('ember-template-compiler: assert-reserved-named-arguments', class extends TestCase {
['@test @arguments is reserved'](assert) {
assert.expectAssertion(() => {
compile('{{@arguments}}', { moduleName: 'baz/foo-bar' });
}, `'@arguments' is reserved. ('baz/foo-bar' @ L1:C2) `);
assert.expectAssertion(() => {
compile(`{{#if @arguments}}Yup{{/if}}`, { moduleName: 'baz/foo-bar' });
}, `'@arguments' is reserved. ('baz/foo-bar' @ L1:C6) `);
assert.expectAssertion(() => {
compile(`{{input type=(if @arguments "bar" "baz")}}`, { moduleName: 'baz/foo-bar'});
}, `'@arguments' is reserved. ('baz/foo-bar' @ L1:C17) `);
}
/*
... add a test property explicitly for each (I like this as its easier to grep vs saving a few lines):
'@arguments',
'@args',
'@Arguments', '@Args',
'@A', '@FOO', '@Foo',
'@.', '@_', '@-', '@$'
*/
});
} else {
moduleFor('ember-template-compiler: assert-reserved-named-arguments', class extends TestCase {
/*
Add the else tests here
*/
});
} |
Fix travis Remove assert(1) Rewrite assert-reserved-named-arguments test as well
karthiicksiva
force-pushed
the
cleanup_ember_template_compiler
branch
from
December 27, 2017 16:48
3829ebc to
7bd069a
Compare
Contributor
Author
rwjblue
approved these changes
Dec 27, 2017
Member
|
Thank you! |
13 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #15988