Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect result when compress nested empty object in template #3

Open
mnsrv opened this issue Apr 9, 2020 · 2 comments · May be fixed by #4
Open

Incorrect result when compress nested empty object in template #3

mnsrv opened this issue Apr 9, 2020 · 2 comments · May be fixed by #4

Comments

@mnsrv
Copy link

mnsrv commented Apr 9, 2020

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
       }

@mnsrv mnsrv linked a pull request Apr 9, 2020 that will close this issue
@jgranstrom
Copy link
Owner

jgranstrom commented Apr 29, 2020

Good catch, let me have a look at the PR when I’m back home and get it merged. Thank you @mnsrv

@rimiti
Copy link

rimiti commented Nov 4, 2020

@jgranstrom any update about this topic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants