pleroma-fe/test/unit/specs/services/theme_data/iss_deserializer.spec.js
2024-09-20 02:05:25 +03:00

17 lines
640 B
JavaScript

import { deserialize } from 'src/services/theme_data/iss_deserializer.js'
import { serialize } from 'src/services/theme_data/iss_serializer.js'
import Button from 'src/components/button.style.js'
describe.only('ISS (de)serialization', () => {
describe('ISS deserialization', () => {
it('Output should = input', () => {
const normalized = Button.defaultRules.map(x => ({ component: 'Button', ...x }))
const serialized = serialize(normalized)
const deserialized = deserialize(serialized)
// deserialized.toString()
expect(JSON.stringify(deserialized)).to.equal(JSON.stringify(normalized))
})
})
})