Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
33 additions
and
151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import mdText from 'ember-remarkable/components/md-text'; | ||
|
||
export default mdText; | ||
export { default } from 'ember-remarkable/components/md-text'; |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('md-text', 'Integration | Component | md text', { | ||
integration: true | ||
}); | ||
|
||
test('it renders', function(assert) { | ||
this.render(hbs`{{md-text text="# An awesome h1!"}}`); | ||
assert.equal(this.$().text().trim(), 'An awesome h1!'); | ||
}); | ||
|
||
test('it parses markdown', function(assert) { | ||
this.render(hbs`{{md-text text="# An awesome h1!"}}`); | ||
assert.equal(this.$('h1').text().trim(), 'An awesome h1!'); | ||
}); | ||
|
||
test('it correctly creates a link from a url', function(assert) { | ||
this.render(hbs`{{md-text text='# Markdown is fun www.google.com' linkify=true}}`); | ||
assert.equal(this.$().find('a').length, 1); | ||
}); | ||
|
||
test('it does not render html when the html option is set to false', function(assert) { | ||
this.render(hbs`{{md-text text="<abbr>Cool</abbr>"}}`); | ||
assert.equal(this.$().find('abbr').length, 0); | ||
}); | ||
|
||
test('it renders html when the html option is set to true', function(assert) { | ||
this.render(hbs`{{md-text text="<abbr>Cool</abbr>" html=true}}`); | ||
assert.equal(this.$().find('abbr').length, 1); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.