Skip to content

Commit

Permalink
remove styled-components matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleBertoli committed Jun 22, 2017
1 parent e936474 commit d73b4cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 60 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const toMatchStyledComponentsSnapshot = require('./matchers/toMatchStyledComponentsSnapshot')
const toHaveStyleRule = require('./matchers/toHaveStyleRule')
const styleSheetSerializer = require('./serializers/styleSheetSerializer')
const styleSheet = require('styled-components/lib/models/StyleSheet')
Expand All @@ -9,4 +8,4 @@ if (isOverV2()) {
}

expect.addSnapshotSerializer(styleSheetSerializer)
expect.extend({ toMatchStyledComponentsSnapshot, toHaveStyleRule })
expect.extend({ toHaveStyleRule })
49 changes: 0 additions & 49 deletions src/matchers/toMatchStyledComponentsSnapshot.js

This file was deleted.

8 changes: 4 additions & 4 deletions test/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`toMatchStyledComponentsSnapshot mount 1`] = `
exports[`toMatchSnapshot mount 1`] = `
.c0 {
padding: 4em;
background: papayawhip;
Expand Down Expand Up @@ -49,9 +49,9 @@ exports[`toMatchStyledComponentsSnapshot mount 1`] = `
</styled.section>
`;

exports[`toMatchStyledComponentsSnapshot null 1`] = `null`;
exports[`toMatchSnapshot null 1`] = `null`;

exports[`toMatchStyledComponentsSnapshot shallow 1`] = `
exports[`toMatchSnapshot shallow 1`] = `
.c0 {
padding: 4em;
background: papayawhip;
Expand All @@ -66,7 +66,7 @@ exports[`toMatchStyledComponentsSnapshot shallow 1`] = `
</section>
`;

exports[`toMatchStyledComponentsSnapshot test-renderer 1`] = `
exports[`toMatchSnapshot test-renderer 1`] = `
.c0 {
padding: 4em;
background: papayawhip;
Expand Down
10 changes: 5 additions & 5 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const Title = styled.h1`
}
`

describe('toMatchStyledComponentsSnapshot', () => {
describe('toMatchSnapshot', () => {
test('null', () => {
expect(null).toMatchStyledComponentsSnapshot()
expect(null).toMatchSnapshot()
})

test('test-renderer', () => {
Expand All @@ -43,7 +43,7 @@ describe('toMatchStyledComponentsSnapshot', () => {
</Wrapper>,
).toJSON()

expect(tree).toMatchStyledComponentsSnapshot()
expect(tree).toMatchSnapshot()
})

test('shallow', () => {
Expand All @@ -53,7 +53,7 @@ describe('toMatchStyledComponentsSnapshot', () => {
</Wrapper>,
)

expect(tree).toMatchStyledComponentsSnapshot()
expect(tree).toMatchSnapshot()
})

test('mount', () => {
Expand All @@ -63,7 +63,7 @@ describe('toMatchStyledComponentsSnapshot', () => {
</Wrapper>,
)

expect(tree).toMatchStyledComponentsSnapshot()
expect(tree).toMatchSnapshot()
})
})

Expand Down

0 comments on commit d73b4cb

Please sign in to comment.