|
|
@@ -53,6 +53,8 @@ describe(':class', function () {
|
|
|
expect(el.className).toBe('a b c')
|
|
|
dir.update(['d', 'c'])
|
|
|
expect(el.className).toBe('a c d')
|
|
|
+ dir.update(['w', 'x y z'])
|
|
|
+ expect(el.className).toBe('a w x y z')
|
|
|
dir.update()
|
|
|
expect(el.className).toBe('a')
|
|
|
// test mutating array
|
|
|
@@ -64,13 +66,13 @@ describe(':class', function () {
|
|
|
dir.update(arr)
|
|
|
expect(el.className).toBe('a f')
|
|
|
// test array with objects
|
|
|
- dir.update(['x', {y: true, z: true}])
|
|
|
+ dir.update(['x', { y: true, z: true }])
|
|
|
expect(el.className).toBe('a x y z')
|
|
|
- dir.update(['x', {y: true, z: false}])
|
|
|
+ dir.update(['x', { y: true, z: false }])
|
|
|
expect(el.className).toBe('a x y')
|
|
|
- dir.update(['f', {z: true}])
|
|
|
+ dir.update(['f', { z: true }])
|
|
|
expect(el.className).toBe('a f z')
|
|
|
- dir.update(['l', 'f', {n: true, z: true}])
|
|
|
+ dir.update(['l', 'f', { n: true, z: true }])
|
|
|
expect(el.className).toBe('a f z l n')
|
|
|
dir.update(['x', {}])
|
|
|
expect(el.className).toBe('a x')
|