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

test(general): Added basic snapshot tests for normalize and event parsing #154

Merged
merged 12 commits into from
Jan 22, 2019

Conversation

mitsuhiko
Copy link
Member

No description provided.

Deserialize::deserialize(deserializer)?,
Default::default(),
))
self.serialize_with_meta(serializer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break for non-struct types. I'd say we remove this impl completely, as one should always go through the helper methods.

@jan-auer
Copy link
Member

Looks like on Travis it can't invoke this correctly and fails with a panic: https://github.com/mitsuhiko/insta/blob/901b5093c9dae7c53d62023301b4ae8bfe878e32/src/runtime.rs#L61-L67

https://github.com/mitsuhiko/insta/blob/901b5093c9dae7c53d62023301b4ae8bfe878e32/src/runtime.rs#L61-L67
...
  10: insta::runtime::get_cargo_workspace
             at /home/travis/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/insta-0.3.0/src/runtime.rs:53
  11: insta::runtime::assert_snapshot
             at /home/travis/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/insta-0.3.0/src/runtime.rs:354
  12: test_fixtures::test_cordova
             at general/tests/test_fixtures.rs:31
...

After that the Workspace mutex is poisoned and fails subsequently.

@codecov-io
Copy link

codecov-io commented Jan 22, 2019

Codecov Report

Merging #154 into master will increase coverage by 1.32%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #154      +/-   ##
=========================================
+ Coverage   58.18%   59.5%   +1.32%     
=========================================
  Files          83      84       +1     
  Lines        8991    8997       +6     
=========================================
+ Hits         5231    5354     +123     
+ Misses       3760    3643     -117
Impacted Files Coverage Δ
common/src/upstream.rs 60.37% <0%> (ø) ⬆️
general/tests/test_fixtures.rs 100% <100%> (ø)
general/src/types/annotated.rs 78.69% <100%> (+2.97%) ⬆️
general/src/store/normalize/mechanism.rs 34.35% <0%> (+1.16%) ⬆️
general/src/types/impls.rs 80.8% <0%> (+1.33%) ⬆️
general/src/protocol/contexts.rs 98.56% <0%> (+1.43%) ⬆️
general/src/store/normalize/contexts.rs 91.07% <0%> (+2.38%) ⬆️
general/src/protocol/types.rs 75.16% <0%> (+2.64%) ⬆️
general/src/processor/attrs.rs 70.4% <0%> (+2.72%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a2ceaf...68a71de. Read the comment docs.

@mitsuhiko mitsuhiko merged commit 82987e3 into master Jan 22, 2019
@mitsuhiko mitsuhiko deleted the feature/snapshot-tests branch January 22, 2019 00:16
jan-auer added a commit that referenced this pull request Jan 22, 2019
* master:
  test(general): Added basic snapshot tests for normalize and event parsing (#154)
  release: 0.4.2
  fix(general): Broken sdk_info parsing (#156)
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 this pull request may close these issues.

3 participants