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

handle cyclic references #6

Open
orta opened this issue May 20, 2017 · 0 comments
Open

handle cyclic references #6

orta opened this issue May 20, 2017 · 0 comments

Comments

@orta
Copy link
Member

orta commented May 20, 2017

describe("layout", () => {
  it("renders as expected", () => {
    const homeComponent = renderer.create(<Home home={homeProps(3, 3, 3).home}/>).toJSON()

    expect(homeComponent).toMatchSnapshot()
    console.log(homeComponent)

    const jsonRep = JSON.stringify(homeComponent)
    fs.writeFileSync("home-component.json", jsonRep)

    expect(homeComponent).toMatchSVGSnapshot(620, 480)
  })
})

Can't even generate JSON:

  ● layout › renders as expected

    TypeError: Converting circular structure to JSON
        at JSON.stringify (<anonymous>)
      
      at Object.it (src/lib/containers/__tests__/file:/Users/orta/dev/projects/artsy/ios/emission/src/lib/containers/__tests__/home-tests.tsx:43:26)
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

No branches or pull requests

1 participant