Преглед изворни кода

rename test titles + compiler.eval test

Evan You пре 12 година
родитељ
комит
3ddf84e559

+ 1 - 0
test/unit/runner.html

@@ -18,6 +18,7 @@
 
         <!-- specs -->
         <script src="specs/utils.js"></script>
+        <script src="specs/compiler.js"></script>
         <script src="specs/binding.js"></script>
         <script src="specs/directive.js"></script>
         <script src="specs/observer.js"></script>

+ 1 - 1
test/unit/specs/api.js

@@ -1,4 +1,4 @@
-describe('UNIT: API', function () {
+describe('API', function () {
 
     var utils = require('vue/src/utils'),
         assets = require('vue/src/config').globalAssets,

+ 1 - 1
test/unit/specs/binding.js

@@ -1,4 +1,4 @@
-describe('UNIT: Binding', function () {
+describe('Binding', function () {
 
     var Binding = require('vue/src/binding'),
         nextTick = require('vue/src/utils').nextTick

+ 19 - 0
test/unit/specs/compiler.js

@@ -0,0 +1,19 @@
+describe('Compiler', function () {
+    
+    describe('.eval()', function () {
+
+        it('should eval correct value', function () {
+            var v = new Vue({
+                data: {
+                    b: 1,
+                    c: {
+                        d: 2
+                    }
+                }
+            })
+            assert.strictEqual(v.$compiler.eval('a {{b}} {{b + c.d}} c'), 'a 1 3 c')
+        })
+
+    })
+
+})

+ 1 - 1
test/unit/specs/deps-parser.js

@@ -1,4 +1,4 @@
-describe('UNIT: Dependency Parser', function () {
+describe('Dependency Parser', function () {
 
     var DepsParser = require('vue/src/deps-parser')
 

+ 1 - 1
test/unit/specs/directive.js

@@ -1,4 +1,4 @@
-describe('UNIT: Directive', function () {
+describe('Directive', function () {
 
     var Directive  = require('vue/src/directive'),
         directives = require('vue/src/directives')

+ 1 - 1
test/unit/specs/directives.js

@@ -1,4 +1,4 @@
-describe('UNIT: Directives', function () {
+describe('Directives', function () {
 
     var nextTick = require('vue/src/utils').nextTick,
         VM = require('vue/src/viewmodel')

+ 1 - 1
test/unit/specs/exp-parser.js

@@ -1,4 +1,4 @@
-describe('UNIT: Expression Parser', function () {
+describe('Expression Parser', function () {
 
     var ExpParser = require('vue/src/exp-parser'),
         utils = require('vue/src/utils'),

+ 1 - 1
test/unit/specs/filters.js

@@ -1,4 +1,4 @@
-describe('UNIT: Filters', function () {
+describe('Filters', function () {
 
     var filters = require('vue/src/filters')
     

+ 1 - 1
test/unit/specs/observer.js

@@ -1,4 +1,4 @@
-describe('UNIT: Observer', function () {
+describe('Observer', function () {
 
     var Observer = require('vue/src/observer'),
         Emitter  = require('vue/src/emitter')

+ 1 - 1
test/unit/specs/text-parser.js

@@ -1,4 +1,4 @@
-describe('UNIT: TextNode Parser', function () {
+describe('Text Parser', function () {
 
     var TextParser = require('vue/src/text-parser')
 

+ 1 - 1
test/unit/specs/transition.js

@@ -1,4 +1,4 @@
-describe('UNIT: Transition', function () {
+describe('Transition', function () {
 
     var transition = require('vue/src/transition'),
         config     = require('vue/src/config'),

+ 1 - 1
test/unit/specs/utils.js

@@ -1,4 +1,4 @@
-describe('UNIT: Utils', function () {
+describe('Utils', function () {
 
     var utils = require('vue/src/utils'),
         config = require('vue/src/config')

+ 1 - 1
test/unit/specs/viewmodel.js

@@ -1,4 +1,4 @@
-describe('UNIT: ViewModel', function () {
+describe('ViewModel', function () {
 
     var nextTick = require('vue/src/utils').nextTick