RichTextTests.js 530 B

123456789101112131415161718192021222324
  1. import CodeMirror from 'codemirror'
  2. import fixture from './support/fixture'
  3. const TEXTAREA_HTML = '<textarea>Test</textarea>'
  4. describe('fixtures', function () {
  5. beforeEach(function () {
  6. this.textarea = fixture.load(TEXTAREA_HTML)
  7. this.cm = CodeMirror.fromTextArea(this.textarea)
  8. })
  9. afterEach(() => {
  10. fixture.cleanUp()
  11. })
  12. it('loads fixtures', function () {
  13. expect(this.textarea.value).to.equal('Test')
  14. })
  15. it('works with CM', function () {
  16. expect(this.cm.getValue()).to.equal('Test')
  17. })
  18. })