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

fix: update test snapshots #729

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified test/babel6/snapshots/external.js.snap
Binary file not shown.
Binary file modified test/babel6/snapshots/index.js.snap
Binary file not shown.
Binary file modified test/babel6/snapshots/plugins.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion test/external.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ test('Makes sure that style nodes are not re-used', async t => {
test('Make sure that it works with the new automatic transform', async t => {
const { code } = await transformSource(
`
import { css } from "styled-jsx/css";
import css from "styled-jsx/css";

const A = css.resolve\`
div {
Expand Down
Binary file modified test/snapshots/external.js.snap
Binary file not shown.
54 changes: 20 additions & 34 deletions test/snapshots/index.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,26 @@ Generated by [AVA](https://ava.li).
</div>;␊
}`

## works with exported jsx-style (CommonJS modules)

> Snapshot 1

`"use strict";␊
var _style = _interopRequireDefault(require("styled-jsx/style"));␊
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }␊
module.exports = () => <p className={"jsx-3800097675"}><_style.default id={"3800097675"}>{"p.jsx-3800097675{color:red;}"}</_style.default></p>;`

## works with exported non-jsx style (CommonJS modules)

> Snapshot 1

`"use strict";␊
module.exports = () => <p><style>{`p { color:red; }`}</style></p>;`

## works with expressions in template literals

> Snapshot 1
Expand Down Expand Up @@ -321,20 +341,6 @@ Generated by [AVA](https://ava.li).
const Test2 = () => <_JSXStyle id={"2743241663"}>{"p{color:red;}"}</_JSXStyle>;`

## works with module.exports component (CommonJS modules)

> Snapshot 1

`"use strict";␊
var _style = _interopRequireDefault(require("styled-jsx/style"));␊
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }␊
module.exports = () => <p className={"jsx-2982525546"}>␊
<_style.default id={"2982525546"}>{"p.jsx-2982525546{color:red;}"}</_style.default>␊
</p>;`

## works with multiple jsx blocks

> Snapshot 1
Expand Down Expand Up @@ -391,23 +397,3 @@ Generated by [AVA](https://ava.li).
<p className={"jsx-2743241663"}>woot</p>␊
<_JSXStyle id={"2743241663"}>{"p.jsx-2743241663{color:red;}"}</_JSXStyle>␊
</div>);`

## works with exported jsx-style (CommonJS modules)

> Snapshot 1

`"use strict";␊
var _style = _interopRequireDefault(require("styled-jsx/style"));␊
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }␊
module.exports = () => <p className={"jsx-3800097675"}><_style.default id={"3800097675"}>{"p.jsx-3800097675{color:red;}"}</_style.default></p>;`

## works with exported non-jsx style (CommonJS modules)

> Snapshot 1

`"use strict";␊
module.exports = () => <p><style>{`p { color:red; }`}</style></p>;`
Binary file modified test/snapshots/index.js.snap
Binary file not shown.
Binary file modified test/snapshots/plugins.js.snap
Binary file not shown.