Skip to content
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

Merged
merged 21 commits into from Sep 14, 2021
Merged

test: adjust tests after the bump #33171

merged 21 commits into from Sep 14, 2021

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Sep 14, 2021

Description

Documentation

Related Issues

@pieh pieh added the status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged label Sep 14, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 14, 2021
@pieh pieh removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 14, 2021
@@ -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"
Copy link
Contributor Author

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

Comment on lines -15 to +43
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([]),
}
}),
})
Copy link
Contributor Author

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`,
Copy link
Contributor Author

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

@pieh pieh changed the title [do-not-merge] just checking test: adjust tests after the bump Sep 14, 2021
@pieh pieh marked this pull request as ready for review September 14, 2021 17:51
@pieh
Copy link
Contributor Author

pieh commented Sep 14, 2021

not everything fixed, but merging this in as at least unit tests on linux are happy (and e2e/integration tests actually run now)

@pieh pieh merged commit 4712acc into master Sep 14, 2021
@pieh pieh deleted the ci-test branch September 14, 2021 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants