-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: adjust tests after the bump #33171
Conversation
This reverts commit 4d7a20c.
@@ -26,7 +26,8 @@ | |||
"@babel/core": "^7.15.5", | |||
"@babel/helper-plugin-test-runner": "7.14.5", | |||
"@babel/plugin-transform-modules-commonjs": "^7.15.4", | |||
"@types/babel__core": "^7.1.15" | |||
"@types/babel__core": "^7.1.15", | |||
"cross-env": "^7.0.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cross-env
used in prepare
script, but not declared in devDeps
const pluginSchema = pluginSchemaFunction({ Joi }) | ||
const pluginSchema = pluginSchemaFunction({ | ||
Joi: Joi.extend(joi => { | ||
return { | ||
base: joi.any(), | ||
type: `subPlugins`, | ||
args: (): any => | ||
joi | ||
.array() | ||
.items( | ||
joi | ||
.alternatives( | ||
joi.string(), | ||
joi.object({ | ||
resolve: Joi.string(), | ||
options: Joi.object({}).unknown(true), | ||
}) | ||
) | ||
.custom(value => { | ||
if (typeof value === `string`) { | ||
value = { resolve: value } | ||
} | ||
|
||
return value | ||
}, `Gatsby specific subplugin validation`) | ||
) | ||
.default([]), | ||
} | ||
}), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test helper wasn't aware of .subPlugins
so this adds smaller stub that pretty much just checks for valid structure
@@ -56,6 +56,7 @@ describe(`calcDirtyHtmlFiles`, () => { | |||
// eslint-disable-next-line @typescript-eslint/naming-convention | |||
pluginCreator___NODE: `foo`, | |||
updatedAt: 1, | |||
mode: `SSG`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mocked pages are not using createPage
action creator, so we fallback/defaultmode
is not set
… in plugin options
not everything fixed, but merging this in as at least unit tests on linux are happy (and e2e/integration tests actually run now) |
Description
Documentation
Related Issues