-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'latest' into WSTEAM1-1367
- Loading branch information
Showing
16 changed files
with
113 additions
and
39 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+38.8 MB
...nux-x64-gnu-npm-14.2.10-c8787ddfc6-10.zip → ...arwin-arm64-npm-14.2.10-ee14b48ab4-10.zip
Binary file not shown.
Binary file renamed
BIN
+64.4 KB
...ress-npm-4.20.0-a4b76bf3f8-4131f566cf.zip → ...ress-npm-4.21.1-f1cd48000b-5d4a36dd03.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+9.55 KB
...atic-npm-1.16.0-88462a5f62-29a01f67e8.zip → ...atic-npm-1.16.2-5d8e560aec-7fa9d9c680.zip
Binary file not shown.
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
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
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 |
---|---|---|
|
@@ -5,6 +5,8 @@ describe('litePageTransforms', () => { | |
it('should append .lite suffix to valid hrefs', () => { | ||
const html = ` | ||
<a href="https://www.bbc.com/news">News</a> | ||
<a href="https://www.bbc.com/serbian/lat">News</a> | ||
<a href="https://www.bbc.com/mundo">News</a> | ||
<a href="https://www.bbcrussian.com/news">News</a> | ||
<a href="/news">News</a> | ||
`; | ||
|
@@ -13,31 +15,45 @@ describe('litePageTransforms', () => { | |
|
||
expect(modifiedHtml).toEqual(` | ||
<a href="https://www.bbc.com/news.lite">News</a> | ||
<a href="https://www.bbc.com/serbian/lat.lite">News</a> | ||
<a href="https://www.bbc.com/mundo.lite">News</a> | ||
<a href="https://www.bbcrussian.com/news.lite">News</a> | ||
<a href="/news.lite">News</a> | ||
`); | ||
}); | ||
|
||
it('should not append .lite suffix to invalid hrefs', () => { | ||
const html = ` | ||
const originalHtml = ` | ||
<a href="https://www.bbc.co.uk/news">News</a> | ||
<a href="https://www.bbc.com/news.lite">News</a> | ||
<a href="https://www.bbc.com/news.amp">News</a> | ||
<a href="#news">News</a> | ||
<a href="mailto:[email protected]">News</a> | ||
`; | ||
|
||
const modifiedHtml = litePageTransforms(html); | ||
const modifiedHtml = litePageTransforms(originalHtml); | ||
|
||
expect(modifiedHtml).toEqual(originalHtml); | ||
}); | ||
|
||
expect(modifiedHtml).toEqual(html); | ||
it('should not append .lite suffix to an invalid "service"', () => { | ||
const originalHtml = ` | ||
<a href="https://www.bbc.co.uk/future">Future</a> | ||
<a href="https://www.bbc.com/food">Food</a> | ||
<a href="https://www.bbc.com/weather">Weather</a> | ||
`; | ||
|
||
const modifiedHtml = litePageTransforms(originalHtml); | ||
|
||
expect(modifiedHtml).toEqual(originalHtml); | ||
}); | ||
|
||
it('should not append .lite suffix when no anchor tags are present', () => { | ||
const html = '<p>I am a paragraph</p>'; | ||
const originalHtml = '<p>I am a paragraph</p>'; | ||
|
||
const modifiedHtml = litePageTransforms(html); | ||
const modifiedHtml = litePageTransforms(originalHtml); | ||
|
||
expect(modifiedHtml).toEqual(html); | ||
expect(modifiedHtml).toEqual(originalHtml); | ||
}); | ||
}); | ||
}); |
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
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