瀏覽代碼

Test for CodeEditor.Model ctor with initial value

Vidar Tonaas Fauske 8 年之前
父節點
當前提交
c08e712a28
共有 1 個文件被更改,包括 8 次插入0 次删除
  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();
     });
 
   });