-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: the `config` option can be `boolean` or `string`, context is frozen
- Loading branch information
1 parent
108d871
commit d0ea725
Showing
36 changed files
with
1,111 additions
and
1,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`"config" option should throw an error on the invalid config: errors 1`] = ` | ||
Array [ | ||
"ModuleBuildError: Module build failed (from \`replaced original path\`): | ||
Error: invalid postcss config", | ||
] | ||
`; | ||
|
||
exports[`"config" option should throw an error on the invalid config: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should throw an error on the unresolved config: errors 1`] = ` | ||
Array [ | ||
"ModuleBuildError: Module build failed (from \`replaced original path\`): | ||
Error: No PostCSS Config found in: /test/fixtures/config-scope/css/unresolve.js", | ||
] | ||
`; | ||
|
||
exports[`"config" option should throw an error on the unresolved config: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work "String" value (relative path): css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work "String" value (relative path): errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work "String" value (relative path): warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "String" value (absolute path): css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work with "String" value (absolute path): errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "String" value (absolute path): warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "String" value (with path to the directory with the configuration): css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work with "String" value (with path to the directory with the configuration): errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "String" value (with path to the directory with the configuration): warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "String" value and respect all options: css 1`] = ` | ||
"a { | ||
color: black | ||
} | ||
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLnNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0FBREYiLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiYVxuICBjb2xvcjogYmxhY2tcbiJdfQ== */" | ||
`; | ||
|
||
exports[`"config" option should work with "String" value and respect all options: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "String" value and respect all options: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "false" value: css 1`] = ` | ||
"a { color: black } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work with "false" value: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "false" value: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "package.json" configuration: css 1`] = ` | ||
".import { | ||
color: red; | ||
} | ||
.test { | ||
color: blue; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work with "package.json" configuration: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "package.json" configuration: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "true" value: css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work with "true" value: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with "true" value: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with the "postcssOptions" option: css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
[dir=ltr] .foo { float: right; | ||
} | ||
[dir=rtl] .foo { | ||
float: left; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work with the "postcssOptions" option: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work with the "postcssOptions" option: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work without the specified value in the "postcssOptions" option: css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work without the specified value in the "postcssOptions" option: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work without the specified value in the "postcssOptions" option: warnings 1`] = `Array []`; | ||
|
||
exports[`"config" option should work without the specified value: css 1`] = ` | ||
"a { color: rgba(0, 0, 0, 1.0) } | ||
.foo { | ||
float: right; | ||
} | ||
" | ||
`; | ||
|
||
exports[`"config" option should work without the specified value: errors 1`] = `Array []`; | ||
|
||
exports[`"config" option should work without the specified value: warnings 1`] = `Array []`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`"exec" option should work with "Boolean" value: css 1`] = ` | ||
"a { | ||
color: green | ||
}" | ||
`; | ||
|
||
exports[`"exec" option should work with "Boolean" value: errors 1`] = `Array []`; | ||
|
||
exports[`"exec" option should work with "Boolean" value: warnings 1`] = `Array []`; | ||
|
||
exports[`"exec" option should work with "JSS" parser: css 1`] = ` | ||
"a { | ||
color: yellow | ||
}" | ||
`; | ||
|
||
exports[`"exec" option should work with "JSS" parser: errors 1`] = `Array []`; | ||
|
||
exports[`"exec" option should work with "JSS" parser: warnings 1`] = `Array []`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.