Skip to content

Incorrect result when compress nested empty object in template #3

@mnsrv

Description

@mnsrv

I have two similar objects with empty object. When compressing with zipson part of state disappearing.

I wrote two tests in test/full/object.ts:

it('nested empty object', function() {
  testPackUnpack({ a: { 1: {} }, c: 42 })
})

it('nested empty object template', function() {
  testPackUnpack({ a: { 1: {} }, b: { 1: {} }, c: 42 })
})

Second test is failing

1) object
       nested empty template:

      unpacked integrity
      + expected - actual

       {
      -  "a": {}
      -  "b": {}
      +  "a": {
      +    "1": {}
      +  }
      +  "b": {
      +    "1": {}
      +  }
         "c": 42
       }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions