-
-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
You can now use `svgr.sync` to call svgr synchronously! Closes #185
- Loading branch information
Showing
12 changed files
with
425 additions
and
199 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`svgo async #loadConfig [async] should load config using filePath 1`] = ` | ||
Object { | ||
"dimensions": true, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": true, | ||
"native": false, | ||
"noSemi": true, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": Array [ | ||
Array [ | ||
"#063855", | ||
"currentColor", | ||
], | ||
], | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
} | ||
`; | ||
|
||
exports[`svgo async #loadConfig [async] should not load config with "runtimeConfig: false 1`] = ` | ||
Object { | ||
"dimensions": true, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": true, | ||
"native": false, | ||
"noSemi": true, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": Array [ | ||
Array [ | ||
"#063855", | ||
"currentColor", | ||
], | ||
], | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
"useRuntimeConfig": false, | ||
} | ||
`; | ||
|
||
exports[`svgo async #loadConfig [async] should use default config without state.filePath 1`] = ` | ||
Object { | ||
"dimensions": false, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": false, | ||
"native": false, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": null, | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
} | ||
`; | ||
|
||
exports[`svgo async #loadConfig [async] should work with custom config path 1`] = ` | ||
Object { | ||
"dimensions": true, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": true, | ||
"native": false, | ||
"noSemi": true, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": Array [ | ||
Array [ | ||
"#063855", | ||
"currentColor", | ||
], | ||
], | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
} | ||
`; | ||
|
||
exports[`svgo sync #loadConfig [sync] should load config using filePath 1`] = ` | ||
Object { | ||
"dimensions": true, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": true, | ||
"native": false, | ||
"noSemi": true, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": Array [ | ||
Array [ | ||
"#063855", | ||
"currentColor", | ||
], | ||
], | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
} | ||
`; | ||
|
||
exports[`svgo sync #loadConfig [sync] should not load config with "runtimeConfig: false 1`] = ` | ||
Object { | ||
"dimensions": true, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": true, | ||
"native": false, | ||
"noSemi": true, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": Array [ | ||
Array [ | ||
"#063855", | ||
"currentColor", | ||
], | ||
], | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
"useRuntimeConfig": false, | ||
} | ||
`; | ||
|
||
exports[`svgo sync #loadConfig [sync] should use default config without state.filePath 1`] = ` | ||
Object { | ||
"dimensions": false, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": false, | ||
"native": false, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": null, | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
} | ||
`; | ||
|
||
exports[`svgo sync #loadConfig [sync] should work with custom config path 1`] = ` | ||
Object { | ||
"dimensions": true, | ||
"expandProps": "end", | ||
"h2xConfig": null, | ||
"icon": true, | ||
"native": false, | ||
"noSemi": true, | ||
"prettier": true, | ||
"prettierConfig": null, | ||
"ref": false, | ||
"replaceAttrValues": Array [ | ||
Array [ | ||
"#063855", | ||
"currentColor", | ||
], | ||
], | ||
"runtimeConfig": true, | ||
"svgProps": null, | ||
"svgo": true, | ||
"svgoConfig": null, | ||
"template": null, | ||
"titleProp": false, | ||
} | ||
`; |
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.