Explorar el Código

Test for CodeEditor.Model ctor with initial value

Vidar Tonaas Fauske hace 8 años
padre
commit
c08e712a28
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      test/src/codeeditor/editor.spec.ts

+ 8 - 0
test/src/codeeditor/editor.spec.ts

@@ -23,6 +23,14 @@ describe('CodeEditor.Model', () => {
 
     it('should create a CodeEditor Model', () => {
       expect(model).to.be.a(CodeEditor.Model);
+      expect(model.value.text).to.equal('');
+    });
+
+    it('should create a CodeEditor Model with an initial value', () => {
+      let other = new CodeEditor.Model('Initial text here');
+      expect(other).to.be.a(CodeEditor.Model);
+      expect(other.value.text).to.equal('Initial text here');
+      other.dispose();
     });
 
   });