Henry Jameson 2 tháng trước cách đây
mục cha
commit
d8d766932a

+ 0 - 1
src/services/theme_data/iss_deserializer.js

@@ -125,7 +125,6 @@ export const deserialize = (input) => {
 
       output.directives = Object.fromEntries(content.map(d => {
         const [property, value] = d.split(':')
-        console.log(property, value)
         let realValue = value.trim()
         if (property === 'shadow') {
           realValue = parseShadow(value.split(',').map(v => v.trim()))

+ 2 - 2
test/unit/specs/services/theme_data/iss_deserializer.spec.js

@@ -4,12 +4,12 @@ import Button from 'src/components/button.style.js'
 
 describe.only('ISS (de)serialization', () => {
   describe('ISS deserialization', () => {
-    it('Output should = input', () => {
+    it('Output should equal input', () => {
       const normalized = Button.defaultRules.map(x => ({ component: 'Button', ...x }))
       const serialized = serialize(normalized)
       const deserialized = deserialize(serialized)
-      // deserialized.toString()
 
+      // for some reason comparing objects directly fails the assert
       expect(JSON.stringify(deserialized)).to.equal(JSON.stringify(normalized))
     })
   })