Skip to content

Commit 1ab4528

Browse files
phananyyx990803
authored andcommitted
Use more serious strings in tests
1 parent 125ea02 commit 1ab4528

26 files changed

+294
-294
lines changed

test/e2e/markdown.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ casper.test.begin('markdown', 5, function (test) {
1313
.then(function () {
1414
this.sendKeys(
1515
'textarea',
16-
'## yo\n\n' +
17-
'- test\n' +
18-
'- hi\n\n',
16+
'## foo\n\n' +
17+
'- bar\n' +
18+
'- baz\n\n',
1919
{ keepFocus: true }
2020
)
2121
// keyUp(13)
@@ -32,13 +32,13 @@ casper.test.begin('markdown', 5, function (test) {
3232
.then(function () {
3333
test.assertEval(function () {
3434
return document.querySelector('textarea').value ===
35-
'## yo\n\n- test\n- hi\n\n# hello'
35+
'## foo\n\n- bar\n- baz\n\n# hello'
3636
})
3737
test.assertEval(function () {
3838
return document.querySelector('#editor div')
3939
.innerHTML ===
40-
'<h2 id="yo">yo</h2>\n' +
41-
'<ul>\n<li>test</li>\n<li>hi</li>\n</ul>\n' +
40+
'<h2 id="foo">foo</h2>\n' +
41+
'<ul>\n<li>bar</li>\n<li>baz</li>\n</ul>\n' +
4242
'<h1 id="hello">hello</h1>\n'
4343
})
4444
})

test/e2e/svg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ casper.test.begin('svg', 18, function (test) {
3434
})
3535
.then(function () {
3636
this.fill('#add', {
37-
newlabel: 'hi'
37+
newlabel: 'foo'
3838
})
3939
})
4040
.thenClick('#add > button', function () {

test/unit/specs/api/data_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('Data API', function () {
66
var vm
77
beforeEach(function () {
88
var el = document.createElement('div')
9-
el.setAttribute('prop', 'hi')
9+
el.setAttribute('prop', 'foo')
1010
vm = new Vue({
1111
el: el,
1212
props: ['prop'],
@@ -154,7 +154,7 @@ describe('Data API', function () {
154154
expect(val.a).toBe(1)
155155
expect(val.b.c).toBe(2)
156156
expect(val.d).toBe(2)
157-
expect(val.prop).toBe('hi')
157+
expect(val.prop).toBe('foo')
158158
spy()
159159
}
160160
vm.$log()

test/unit/specs/api/lifecycle_spec.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ describe('Lifecycle API', function () {
1414
it('normal', function () {
1515
var vm = new Vue({
1616
data: {
17-
test: 'hi!'
17+
test: 'foo'
1818
}
1919
})
2020
vm.$mount(el)
2121
expect(vm.$el).toBe(el)
2222
expect(el.__vue__).toBe(vm)
23-
expect(el.textContent).toBe('hi!')
23+
expect(el.textContent).toBe('foo')
2424
})
2525

2626
it('auto-create', function () {
@@ -40,12 +40,12 @@ describe('Lifecycle API', function () {
4040
el.id = 'mount-test'
4141
document.body.appendChild(el)
4242
var vm = new Vue({
43-
data: { test: 'hi!' }
43+
data: { test: 'foo' }
4444
})
4545
vm.$mount('#mount-test')
4646
expect(vm.$el).toBe(el)
4747
expect(el.__vue__).toBe(vm)
48-
expect(el.textContent).toBe('hi!')
48+
expect(el.textContent).toBe('foo')
4949
document.body.removeChild(el)
5050
})
5151

@@ -60,12 +60,12 @@ describe('Lifecycle API', function () {
6060
document.body.appendChild(el)
6161
var vm = new Vue({
6262
replace: true,
63-
data: { test: 'hi!' },
63+
data: { test: 'foo' },
6464
template: '<div>{{test}}</div>'
6565
})
6666
vm.$mount(el)
6767
expect(vm.$el).not.toBe(el)
68-
expect(vm.$el.textContent).toBe('hi!')
68+
expect(vm.$el.textContent).toBe('foo')
6969
expect(document.body.contains(el)).toBe(false)
7070
expect(document.body.lastChild).toBe(vm.$el)
7171
expect(vm.$el.className).toBe('replace-test')
@@ -77,13 +77,13 @@ describe('Lifecycle API', function () {
7777
var vm = new Vue({
7878
_linker: linker,
7979
data: {
80-
test: 'hi!'
80+
test: 'foo'
8181
}
8282
})
8383
vm.$mount(el)
8484
expect(vm.$el).toBe(el)
8585
expect(el.__vue__).toBe(vm)
86-
expect(el.textContent).toBe('hi!')
86+
expect(el.textContent).toBe('foo')
8787
})
8888

8989
it('mount to fragment', function () {
@@ -99,13 +99,13 @@ describe('Lifecycle API', function () {
9999
document.body.appendChild(el)
100100
var vm = new Vue({
101101
replace: true,
102-
data: { test: 'hi!' },
103-
template: '<div>{{test}}</div><div>{{test + "!"}}</div>'
102+
data: { test: 'foo' },
103+
template: '<div>{{test}}</div><div>{{test + "bar"}}</div>'
104104
})
105105
vm.$mount(el)
106106
expect(vm.$el).not.toBe(el)
107-
expect(vm.$el.nextSibling.textContent).toBe('hi!')
108-
expect(vm.$el.nextSibling.nextSibling.textContent).toBe('hi!!')
107+
expect(vm.$el.nextSibling.textContent).toBe('foo')
108+
expect(vm.$el.nextSibling.nextSibling.textContent).toBe('foobar')
109109
expect(document.body.contains(el)).toBe(false)
110110
expect(document.body.lastChild).toBe(vm._fragmentEnd)
111111
vm.$remove()
@@ -115,7 +115,7 @@ describe('Lifecycle API', function () {
115115
var hooks = ['created', 'beforeCompile', 'compiled', 'attached', 'ready']
116116
var options = {
117117
data: {
118-
test: 'hihi'
118+
test: 'foo'
119119
}
120120
}
121121
hooks.forEach(function (hook) {
@@ -300,21 +300,21 @@ describe('Lifecycle API', function () {
300300
el: el,
301301
template: '{{a}}',
302302
data: {
303-
a: 'hi'
303+
a: 'foo'
304304
}
305305
})
306306
expect(vm._directives.length).toBe(1)
307307
var partial = document.createElement('span')
308308
partial.textContent = '{{a}}'
309309
var decompile = vm.$compile(partial)
310-
expect(partial.textContent).toBe('hi')
310+
expect(partial.textContent).toBe('foo')
311311
expect(vm._directives.length).toBe(2)
312312
decompile()
313313
expect(vm._directives.length).toBe(1)
314-
vm.a = 'ha'
314+
vm.a = 'bar'
315315
Vue.nextTick(function () {
316-
expect(el.textContent).toBe('ha')
317-
expect(partial.textContent).toBe('hi')
316+
expect(el.textContent).toBe('bar')
317+
expect(partial.textContent).toBe('foo')
318318
done()
319319
})
320320
})

test/unit/specs/async_component_spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ describe('Async components', function () {
1616
var go = jasmine.createSpy()
1717
new Vue({
1818
el: el,
19-
template: '<test hi="ok" @ready="go"></test>',
19+
template: '<test foo="bar" @ready="go"></test>',
2020
methods: {
2121
go: go
2222
},
2323
components: {
2424
test: function (resolve) {
2525
setTimeout(function () {
2626
resolve({
27-
props: ['hi'],
28-
template: '{{ hi }}',
27+
props: ['foo'],
28+
template: '{{ foo }}',
2929
ready: function () {
3030
this.$emit('ready')
3131
}
@@ -36,7 +36,7 @@ describe('Async components', function () {
3636
}
3737
})
3838
function next () {
39-
expect(el.textContent).toBe('ok')
39+
expect(el.textContent).toBe('bar')
4040
expect(go).toHaveBeenCalled()
4141
done()
4242
}

test/unit/specs/compiler/compile_spec.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('Compile', function () {
5151

5252
it('normal directives', function () {
5353
el.setAttribute('v-a', 'b')
54-
el.innerHTML = '<p v-a:hello.a.b="a" v-b="1">hello</p><div v-b.literal="hi"></div>'
54+
el.innerHTML = '<p v-a:hello.a.b="a" v-b="1">hello</p><div v-b.literal="foo"></div>'
5555
var defA = { priority: 1 }
5656
var defB = { priority: 2 }
5757
var options = _.mergeOptions(Vue.options, {
@@ -95,7 +95,7 @@ describe('Compile', function () {
9595
// 4 (explicit literal)
9696
args = vm._bindDir.calls.argsFor(3)
9797
expect(args[0].name).toBe('b')
98-
expect(args[0].expression).toBe('hi')
98+
expect(args[0].expression).toBe('foo')
9999
expect(args[0].def).toBe(defB)
100100
expect(args[0].modifiers.literal).toBe(true)
101101
expect(args[1]).toBe(el.lastChild)
@@ -219,7 +219,7 @@ describe('Compile', function () {
219219
})
220220

221221
it('inline html', function () {
222-
data.html = '<div>yoyoyo</div>'
222+
data.html = '<div>foo</div>'
223223
el.innerHTML = '{{{html}}} {{{*html}}}'
224224
var htmlDef = Vue.options.directives.html
225225
var linker = compile(el, Vue.options)
@@ -230,7 +230,7 @@ describe('Compile', function () {
230230
expect(htmlArgs[0].expression).toBe('html')
231231
expect(htmlArgs[0].def).toBe(htmlDef)
232232
// with placeholder comments & interpolated one-time html
233-
expect(el.innerHTML).toBe('<!--v-html--> <div>yoyoyo</div>')
233+
expect(el.innerHTML).toBe('<!--v-html--> <div>foo</div>')
234234
})
235235

236236
it('terminal directives', function () {
@@ -334,7 +334,7 @@ describe('Compile', function () {
334334
':test-two-way.sync="a" ' +
335335
':two-way-warn.sync="a + 1" ' +
336336
':test-one-time.once="a" ' +
337-
':literal-with-filter="\'HI\' | lowercase"' +
337+
':literal-with-filter="\'FOO\' | lowercase"' +
338338
'></div>'
339339
compiler.compileAndLinkProps(vm, el.firstChild, props)
340340
// check bindDir calls:
@@ -369,7 +369,7 @@ describe('Compile', function () {
369369
prop = args[0].prop
370370
expect(args[0].name).toBe('prop')
371371
expect(prop.path).toBe('literalWithFilter')
372-
expect(prop.parentPath).toBe("'HI'")
372+
expect(prop.parentPath).toBe("'FOO'")
373373
expect(prop.filters.length).toBe(1)
374374
expect(prop.mode).toBe(bindingModes.ONE_WAY)
375375
})
@@ -378,11 +378,11 @@ describe('Compile', function () {
378378
// temporarily remove vm.$parent
379379
var context = vm._context
380380
vm._context = null
381-
el.setAttribute('v-bind:a', '"hi"')
381+
el.setAttribute('v-bind:a', '"foo"')
382382
el.setAttribute(':b', '[1,2,3]')
383383
compiler.compileAndLinkProps(vm, el, { a: null, b: null })
384384
expect(vm._bindDir.calls.count()).toBe(0)
385-
expect(vm.a).toBe('hi')
385+
expect(vm.a).toBe('foo')
386386
expect(vm.b.join(',')).toBe('1,2,3')
387387
// restore parent mock
388388
vm._context = context
@@ -453,7 +453,7 @@ describe('Compile', function () {
453453
el: el,
454454
template: '<test :msg="msg"></test>',
455455
data: {
456-
msg: 'hi'
456+
msg: 'foo'
457457
},
458458
components: {
459459
test: {
@@ -482,7 +482,7 @@ describe('Compile', function () {
482482
},
483483
components: {
484484
test: {
485-
template: 'hi'
485+
template: 'foo'
486486
}
487487
}
488488
})
@@ -629,7 +629,7 @@ describe('Compile', function () {
629629
el: el,
630630
template: '<div class="{{a}}" :class="bcd"></div>',
631631
data: {
632-
a: 'hi'
632+
a: 'foo'
633633
}
634634
})
635635
expect('Do not mix mustache interpolation and v-bind').toHaveBeenWarned()
@@ -638,7 +638,7 @@ describe('Compile', function () {
638638
it('warn directives on fragment instances', function () {
639639
new Vue({
640640
el: el,
641-
template: '<test id="hi" class="ok" :prop="123"></test>',
641+
template: '<test id="foo" class="ok" :prop="123"></test>',
642642
components: {
643643
test: {
644644
replace: true,

test/unit/specs/directives/element/partial_spec.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ describe('Partial', function () {
1111
it('static', function (done) {
1212
var vm = new Vue({
1313
el: el,
14-
template: '<partial name="yo"></partial>',
14+
template: '<partial name="p"></partial>',
1515
data: {
16-
msg: 'hello'
16+
msg: 'foo'
1717
},
1818
partials: {
19-
yo: '{{msg}}'
19+
p: '{{msg}}'
2020
}
2121
})
22-
expect(el.textContent).toBe('hello')
23-
vm.msg = 'what'
22+
expect(el.textContent).toBe('foo')
23+
vm.msg = 'bar'
2424
_.nextTick(function () {
25-
expect(el.textContent).toBe('what')
25+
expect(el.textContent).toBe('bar')
2626
done()
2727
})
2828
})
@@ -52,14 +52,14 @@ describe('Partial', function () {
5252
el: el,
5353
template: '<div v-for="id in list"><partial v-bind:name="\'test-\' + id"></partial></div>',
5454
data: {
55-
list: ['a', 'b']
55+
list: ['foo', 'bar']
5656
},
5757
partials: {
58-
'test-a': 'a {{id}}',
59-
'test-b': 'b {{id}}'
58+
'test-foo': 'foo {{id}}',
59+
'test-bar': 'bar {{id}}'
6060
}
6161
})
62-
expect(el.textContent).toBe('a ab b')
62+
expect(el.textContent).toBe('foo foobar bar')
6363
})
6464

6565
it('caching', function () {
@@ -75,16 +75,16 @@ describe('Partial', function () {
7575
'<partial name="cache-test"></partial> ' +
7676
'<partial name="cache-test"></partial>',
7777
partials: {
78-
'cache-test': 'cache-test {{msg}}'
78+
'cache-test': 'foo {{msg}}'
7979
}
8080
})
8181
new Comp({
8282
el: el,
8383
data: {
84-
msg: 'hi'
84+
msg: 'bar'
8585
}
8686
})
87-
expect(el.textContent).toBe('cache-test hi cache-test hi')
87+
expect(el.textContent).toBe('foo bar foo bar')
8888
// one call for instance, and one for partial
8989
expect(calls).toBe(2)
9090
// cleanup

0 commit comments

Comments
 (0)