소스 검색

Remove stale array binding test

Caleb Porzio 5 년 전
부모
커밋
e442f8bcb8
3개의 변경된 파일2개의 추가작업 그리고 12개의 파일을 삭제
  1. 0 0
      dist/alpine.js.map
  2. 2 0
      src/component.js
  3. 0 12
      test/bind.spec.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/alpine.js.map


+ 2 - 0
src/component.js

@@ -112,6 +112,8 @@ export default class Component {
     }
 
     initializeElement(el) {
+        // To support class attribute merging, we have to know what the element's
+        // original class attribute looked like for reference.
         if (el.hasAttribute('class') && getXAttrs(el).length > 0) {
             el.__originalClasses = el.getAttribute('class').split(' ')
         }

+ 0 - 12
test/bind.spec.js

@@ -138,18 +138,6 @@ test('class attribute bindings are added by nested object syntax', async () => {
     expect(document.querySelector('span').classList.contains('foo')).toBeTruthy()
 })
 
-test('class attribute bindings are removed by array syntax', async () => {
-    document.body.innerHTML = `
-        <div x-data="{}">
-            <span class="foo" x-bind:class="[]"></span>
-        </div>
-    `
-
-    Alpine.start()
-
-    expect(document.querySelector('span').classList.contains('foo')).toBeFalsy()
-})
-
 test('class attribute bindings are added by array syntax', async () => {
     document.body.innerHTML = `
         <div x-data="{}">

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.