-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gatsby-recipes): Raise an error when an unknown resource is used (#…
- Loading branch information
Showing
3 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
packages/gatsby-recipes/src/__snapshots__/validate-recipe.test.js.snap
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,30 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`validate module validates recipes with resource declarations validates File declarations 1`] = ` | ||
Array [ | ||
Object { | ||
"resource": "File", | ||
"resourceDeclaration": Object { | ||
"contentz": "yo", | ||
"path": "super-duper.md", | ||
}, | ||
"step": 2, | ||
"validationError": [ValidationError: "contentz" is not allowed], | ||
}, | ||
] | ||
`; | ||
|
||
exports[`validate module validates recipes with resource declarations validates File declarations 2`] = `[ValidationError: "contentz" is not allowed]`; | ||
|
||
exports[`validate module validates recipes with resource declarations validates NPMPackage declarations 1`] = ` | ||
Array [ | ||
Object { | ||
"resource": "NPMPackage", | ||
"resourceDeclaration": Object { | ||
"namez": "wee-package", | ||
}, | ||
"step": 1, | ||
"validationError": [ValidationError: child "name" fails because ["name" is required]. "namez" is not allowed], | ||
}, | ||
] | ||
`; |
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