|
@@ -32,13 +32,16 @@ describe('UNIT: Directives', function () {
|
|
|
assert.strictEqual(dir.el.textContent, 'true')
|
|
assert.strictEqual(dir.el.textContent, 'true')
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ it('should work with objects', function () {
|
|
|
|
|
+ dir.update({foo:"bar"})
|
|
|
|
|
+ assert.strictEqual(dir.el.textContent, '{"foo":"bar"}')
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
it('should be empty with other stuff', function () {
|
|
it('should be empty with other stuff', function () {
|
|
|
dir.update(null)
|
|
dir.update(null)
|
|
|
assert.strictEqual(dir.el.textContent, '')
|
|
assert.strictEqual(dir.el.textContent, '')
|
|
|
dir.update(undefined)
|
|
dir.update(undefined)
|
|
|
assert.strictEqual(dir.el.textContent, '')
|
|
assert.strictEqual(dir.el.textContent, '')
|
|
|
- dir.update({a:123})
|
|
|
|
|
- assert.strictEqual(dir.el.textContent, '')
|
|
|
|
|
dir.update(function () {})
|
|
dir.update(function () {})
|
|
|
assert.strictEqual(dir.el.textContent, '')
|
|
assert.strictEqual(dir.el.textContent, '')
|
|
|
})
|
|
})
|
|
@@ -65,13 +68,16 @@ describe('UNIT: Directives', function () {
|
|
|
assert.strictEqual(dir.el.textContent, 'true')
|
|
assert.strictEqual(dir.el.textContent, 'true')
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ it('should work with objects', function () {
|
|
|
|
|
+ dir.update({foo:"bar"})
|
|
|
|
|
+ assert.strictEqual(dir.el.textContent, '{"foo":"bar"}')
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
it('should be empty with other stuff', function () {
|
|
it('should be empty with other stuff', function () {
|
|
|
dir.update(null)
|
|
dir.update(null)
|
|
|
assert.strictEqual(dir.el.innerHTML, '')
|
|
assert.strictEqual(dir.el.innerHTML, '')
|
|
|
dir.update(undefined)
|
|
dir.update(undefined)
|
|
|
assert.strictEqual(dir.el.innerHTML, '')
|
|
assert.strictEqual(dir.el.innerHTML, '')
|
|
|
- dir.update({a:123})
|
|
|
|
|
- assert.strictEqual(dir.el.innerHTML, '')
|
|
|
|
|
dir.update(function () {})
|
|
dir.update(function () {})
|
|
|
assert.strictEqual(dir.el.innerHTML, '')
|
|
assert.strictEqual(dir.el.innerHTML, '')
|
|
|
})
|
|
})
|