-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup ember-template-compiler's tests #16010
Cleanup ember-template-compiler's tests #16010
Conversation
f9cdcb8
to
1e0128e
Compare
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
1e0128e
to
48c2557
Compare
@thoov I am not sure about how to move this? Any idea? //cc @rwjblue |
@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
3829ebc
to
7bd069a
Compare
Thank you! |
Related to #15988