Skip to content
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

failing test for #207 #208

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tests/parse-result-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ QUnit.module('ember-template-recast', function() {
assert.equal(print(ast), `<img src="{{this.something}}">`);
});

QUnit.test('test descriptions with carets pass', function(assert) {
let template = `it('<' function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand what this is testing. This project does not support parsing javascript files...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rwjblue I created a test here as it was the simplest way to demonstrate the error I saw while running the angle brackets codemod on integration tests in my app. It looks like someone has posted an issue too: ember-codemods/ember-angle-brackets-codemod#240

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#207 has my initial breakdown if that helps

'something';
})`;

let ast = parse(template);

assert.equal(print(ast), template);
});

QUnit.test('changing an element to a void element does not print closing tag', function(
assert
) {
Expand Down Expand Up @@ -1211,7 +1221,7 @@ QUnit.module('ember-template-recast', function() {

QUnit.test('mutations retain custom whitespace formatting', function(assert) {
let template = stripIndent`
<Foo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this change, this whitespace is intentional

<Foo
bar = {{ foo }} />
`;

Expand Down