test: consolidate unit tests (#9588)

All mocha tests have been migrated to Jest tests.

Closes #9564
This commit is contained in:
Vladimír Gorej
2024-02-14 11:39:40 +01:00
committed by GitHub
parent 8b0991c5cc
commit 7addbd0eb5
19 changed files with 27 additions and 331 deletions

View File

@@ -9,7 +9,7 @@ describe("<OnlineValidatorBadge/> Anchor Target Safety", function () {
getConfigs: () => ({}),
getComponent: () => null,
specSelectors: {
url: () => "swagger.json"
url: () => "https://smartbear.com/swagger.json"
}
}
const wrapper = mount(
@@ -20,10 +20,10 @@ describe("<OnlineValidatorBadge/> Anchor Target Safety", function () {
// Then
expect(anchor.props().href).toEqual(
"https://validator.swagger.io/validator/debug?url=swagger.json"
"https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fsmartbear.com%2Fswagger.json"
)
expect(anchor.props().target).toEqual("_blank")
expect(anchor.props().rel || "").toInclude("noopener")
expect(anchor.props().rel || "").toInclude("noreferrer")
expect(anchor.props().rel || "").toContain("noopener")
expect(anchor.props().rel || "").toContain("noreferrer")
})
})