Skip to content

Commit 2d95e2c

Browse files
committed
Move @import rules in test to be first
1 parent 78afccd commit 2d95e2c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/react/__tests__/__snapshots__/global.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ exports[`basic 1`] = `
1818
data-emotion="css-global"
1919
>
2020
21-
html{background-color:hotpink;}
21+
@import url('something.com/file.css');
2222
</style>
2323
<style
2424
data-emotion="css-global"
2525
>
2626
27-
h1{-webkit-animation:animation-ocj8pk 1s;animation:animation-ocj8pk 1s;}
27+
html{background-color:hotpink;}
2828
</style>
2929
<style
3030
data-emotion="css-global"
3131
>
3232
33-
@font-face{font-family:some-name;}
33+
h1{-webkit-animation:animation-ocj8pk 1s;animation:animation-ocj8pk 1s;}
3434
</style>
3535
<style
3636
data-emotion="css-global"
3737
>
3838
39-
@import url('something.com/file.css');
39+
@font-face{font-family:some-name;}
4040
</style>
4141
</head>
4242
`;

packages/react/__tests__/at-import.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ test('basic', () => {
1919
<div css={{ color: 'hotpink' }} />
2020
<Global
2121
styles={css`
22+
@import url('https://some-url');
23+
2224
h1 {
2325
color: hotpink;
2426
}
25-
@import url('https://some-url');
2627
`}
2728
/>
28-
</React.Fragment>,
29-
// $FlowFixMe
29+
</React.Fragment>, // $FlowFixMe
3030
document.getElementById('root')
3131
)
3232
expect(document.head).toMatchSnapshot()

packages/react/__tests__/global.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ test('basic', () => {
1717
<CacheProvider value={createCache({ key: 'css' })}>
1818
<Global
1919
styles={[
20+
css`
21+
@import url('something.com/file.css');
22+
`,
2023
{
2124
html: {
2225
backgroundColor: 'hotpink'
@@ -34,10 +37,7 @@ test('basic', () => {
3437
'@font-face': {
3538
fontFamily: 'some-name'
3639
}
37-
},
38-
css`
39-
@import url('something.com/file.css');
40-
`
40+
}
4141
]}
4242
/>
4343
</CacheProvider>,

0 commit comments

Comments
 (0)