Skip to content

Commit 5bd697e

Browse files
crswllyyx990803
authored andcommitted
added array with spaces test, fixed some spacing (vuejs#2678)
1 parent e3057f2 commit 5bd697e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/unit/specs/directives/internal/class_spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ describe(':class', function () {
5353
expect(el.className).toBe('a b c')
5454
dir.update(['d', 'c'])
5555
expect(el.className).toBe('a c d')
56+
dir.update(['w', 'x y z'])
57+
expect(el.className).toBe('a w x y z')
5658
dir.update()
5759
expect(el.className).toBe('a')
5860
// test mutating array
@@ -64,13 +66,13 @@ describe(':class', function () {
6466
dir.update(arr)
6567
expect(el.className).toBe('a f')
6668
// test array with objects
67-
dir.update(['x', {y: true, z: true}])
69+
dir.update(['x', { y: true, z: true }])
6870
expect(el.className).toBe('a x y z')
69-
dir.update(['x', {y: true, z: false}])
71+
dir.update(['x', { y: true, z: false }])
7072
expect(el.className).toBe('a x y')
71-
dir.update(['f', {z: true}])
73+
dir.update(['f', { z: true }])
7274
expect(el.className).toBe('a f z')
73-
dir.update(['l', 'f', {n: true, z: true}])
75+
dir.update(['l', 'f', { n: true, z: true }])
7476
expect(el.className).toBe('a f z l n')
7577
dir.update(['x', {}])
7678
expect(el.className).toBe('a x')

0 commit comments

Comments
 (0)