-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linting errors in AdditionalInfo and HttpService.spec files
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -273,29 +273,29 @@ describe('HttpService', () => { | |
email: '[email protected]', | ||
url: 'https://stoplight.io/contact-us/', | ||
}; | ||
|
||
const license = { | ||
name: 'MIT License', | ||
identifier: 'MIT', | ||
}; | ||
|
||
render( | ||
<AdditionalInfo id="a" contact={contact} license={license} termsOfService="https://stoplight.io/terms/" />, | ||
); | ||
|
||
const licenseLink = screen.getByText('MIT License'); | ||
expect(licenseLink).toHaveAttribute('href', 'https://spdx.org/licenses/MIT.html'); | ||
}); | ||
|
||
it('should prefer license URL over SPDX identifier if both are provided', () => { | ||
const license = { | ||
name: 'MIT License', | ||
url: 'https://opensource.org/licenses/MIT', | ||
identifier: 'MIT', | ||
}; | ||
|
||
render(<AdditionalInfo id="a" license={license} />); | ||
|
||
const licenseLink = screen.getByText('MIT License'); | ||
expect(licenseLink).toHaveAttribute('href', 'https://opensource.org/licenses/MIT'); | ||
}); | ||
|