|
|
@@ -29,26 +29,6 @@ describe('Partial', function () {
|
|
|
})
|
|
|
|
|
|
it('dynamic', function (done) {
|
|
|
- var vm = new Vue({
|
|
|
- el: el,
|
|
|
- template: '<partial name="test-{{id}}"></partial>',
|
|
|
- data: {
|
|
|
- id: 'a'
|
|
|
- },
|
|
|
- partials: {
|
|
|
- 'test-a': 'a {{id}}',
|
|
|
- 'test-b': 'b {{id}}'
|
|
|
- }
|
|
|
- })
|
|
|
- expect(el.textContent).toBe('a a')
|
|
|
- vm.id = 'b'
|
|
|
- _.nextTick(function () {
|
|
|
- expect(el.textContent).toBe('b b')
|
|
|
- done()
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- it('dynamic (new syntax)', function (done) {
|
|
|
var vm = new Vue({
|
|
|
el: el,
|
|
|
template: '<partial bind-name="\'test-\' + id"></partial>',
|
|
|
@@ -100,7 +80,7 @@ describe('Partial', function () {
|
|
|
it('teardown', function () {
|
|
|
var vm = new Vue({
|
|
|
el: el,
|
|
|
- template: '<partial name="test-{{id}}"></partial>',
|
|
|
+ template: '<partial bind-name="\'test-\' + id"></partial>',
|
|
|
data: {
|
|
|
id: 'a'
|
|
|
},
|