Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
5e65161b
Unverified
Commit
5e65161b
authored
Oct 10, 2019
by
Joe Haddad
Committed by
GitHub
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test no-path relative CSS imports (#9028)
parent
ec40d51d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
dark2.svg
test/integration/css/fixtures/url-global/styles/dark2.svg
+17
-0
global1.css
test/integration/css/fixtures/url-global/styles/global1.css
+1
-1
index.test.js
test/integration/css/test/index.test.js
+3
-2
No files found.
test/integration/css/fixtures/url-global/styles/dark2.svg
0 → 100644
View file @
5e65161b
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"114px"
height=
"100px"
viewBox=
"0 0 114 100"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<title>
Logotype - Black
</title>
<desc>
Created with Sketch.
</desc>
<defs>
<linearGradient
x1=
"100.929941%"
y1=
"181.283245%"
x2=
"41.7687834%"
y2=
"100%"
id=
"linearGradient-1"
>
<stop
stop-color=
"#FFFFFF"
offset=
"0%"
></stop>
<stop
stop-color=
"#000000"
offset=
"100%"
></stop>
</linearGradient>
</defs>
<g
id=
"Page-1"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"Black-Triangle"
transform=
"translate(-293.000000, -150.000000)"
fill=
"url(#linearGradient-1)"
>
<polygon
id=
"Logotype---Black"
points=
"350 150 407 250 293 250"
></polygon>
</g>
</g>
</svg>
test/integration/css/fixtures/url-global/styles/global1.css
View file @
5e65161b
.red-text
{
.red-text
{
color
:
red
;
color
:
red
;
background-image
:
url('./dark.svg')
;
background-image
:
url('./dark.svg')
url(dark2.svg)
;
}
}
test/integration/css/test/index.test.js
View file @
5e65161b
...
@@ -486,11 +486,11 @@ describe('CSS Support', () => {
...
@@ -486,11 +486,11 @@ describe('CSS Support', () => {
expect
(
cssFiles
.
length
).
toBe
(
1
)
expect
(
cssFiles
.
length
).
toBe
(
1
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
const
cssContent
=
await
readFile
(
join
(
cssFolder
,
cssFiles
[
0
]),
'utf8'
)
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
expect
(
cssContent
.
replace
(
/
\/\*
.*
?\*\/
/g
,
''
).
trim
()).
toMatch
(
/^
\.
red-text
\{
color:red;background-image:url
\(
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
/^
\.
red-text
\{
color:red;background-image:url
\(
static
\/
media
\/
dark
\.[
a-z0-9
]{32}\.
svg
\)
url
\(
static
\/
media
\/
dark2
\.[
a-z0-9
]{32}\.
svg
\)
\}\.
blue-text
\{
color:orange;font-weight:bolder;background-image:url
\(
static
\/
media
\/
light
\.[
a-z0-9
]{32}\.
svg
\)
;color:#00f
\}
$/
)
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
const
mediaFiles
=
await
readdir
(
mediaFolder
)
expect
(
mediaFiles
.
length
).
toBe
(
2
)
expect
(
mediaFiles
.
length
).
toBe
(
3
)
expect
(
expect
(
mediaFiles
mediaFiles
.
map
(
fileName
=>
.
map
(
fileName
=>
...
@@ -503,6 +503,7 @@ describe('CSS Support', () => {
...
@@ -503,6 +503,7 @@ describe('CSS Support', () => {
).
toMatchInlineSnapshot
(
`
).
toMatchInlineSnapshot
(
`
Array [
Array [
"dark.svg",
"dark.svg",
"dark2.svg",
"light.svg",
"light.svg",
]
]
`
)
`
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment