Skip to content

Commit

Permalink
Merge pull request #2 from zharinov/29648-more-changes
Browse files Browse the repository at this point in the history
29648 more changes
  • Loading branch information
george-wilson-rea authored Jun 25, 2024
2 parents 94bd1c5 + c46a94b commit 5e0c71d
Showing 1 changed file with 54 additions and 41 deletions.
95 changes: 54 additions & 41 deletions lib/modules/datasource/sbt-plugin/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { codeBlock } from 'common-tags';
import { getPkgReleases } from '..';
import { Fixtures } from '../../../../test/fixtures';
import * as httpMock from '../../../../test/http-mock';
Expand Down Expand Up @@ -37,10 +38,12 @@ describe('modules/datasource/sbt-plugin/index', () => {
.get('/maven2/org/scalatest/')
.reply(
200,
'<a href="scalatest/" title=\'scalatest/\'>scalatest_2.12/</a>\n' +
'<a href="scalatest_2.12/" title=\'scalatest_2.12/\'>scalatest_2.12/</a>\n' +
"<a href='scalatest_sjs2.12/'>scalatest_2.12/</a>" +
"<a href='scalatest_native2.12/'>scalatest_2.12/</a>",
codeBlock`
<a href="scalatest/">scalatest/</a>
<a href="scalatest_2.12/">scalatest_2.12/</a>
<a href="scalatest_sjs2.12/">scalatest_sjs2.12/</a>
<a href="scalatest_native2.12/">scalatest_native2.12/</a>
`,
);
httpMock
.scope('https://repo.maven.apache.org')
Expand All @@ -56,62 +59,70 @@ describe('modules/datasource/sbt-plugin/index', () => {
.get('/maven2/org/foundweekends/sbt-bintray/')
.reply(
200,
'<html>\n' +
'<head>\n' +
'</head>\n' +
'<body>\n' +
'<pre><a href="scala_2.12/">scala_2.12/</a></pre>\n' +
'</body>\n' +
'</html>',
codeBlock`
<html>
<head>
</head>
<body>
<pre><a href="scala_2.12/">scala_2.12/</a></pre>
</body>
</html>
`,
);
httpMock
.scope('https://repo.maven.apache.org')
.get('/maven2/org/foundweekends/sbt-bintray/scala_2.12/')
.reply(
200,
'\n' +
'<html>\n' +
'<head>\n' +
'</head>\n' +
'<body>\n' +
'<pre><a href="sbt_1.0/">sbt_1.0/</a></pre>\n' +
'</body>\n' +
'</html>\n',
codeBlock`
<html>
<head>
</head>
<body>
<pre><a href="sbt_1.0/">sbt_1.0/</a></pre>
</body>
</html>
`,
);
httpMock
.scope('https://repo.maven.apache.org')
.get('/maven2/org/foundweekends/sbt-bintray/scala_2.12/sbt_1.0/')
.reply(
200,
'\n' +
'<html>\n' +
'<head>\n' +
'</head>\n' +
'<body>\n' +
'<pre><a href="0.5.5/">0.5.5/</a></pre>\n' +
'</body>\n' +
'</html>\n',
codeBlock`
<html>
<head>
</head>
<body>
<pre><a href="0.5.5/">0.5.5/</a></pre>
</body>
</html>
`,
);

httpMock
.scope('https://repo.maven.apache.org')
.get('/maven2/io/get-coursier/')
.reply(
200,
'<a href="sbt-coursier_2.10_0.13/">sbt-coursier_2.10_0.13/</a>\n' +
'<a href="sbt-coursier_2.12_1.0/">sbt-coursier_2.12_1.0/</a>\n' +
'<a href="sbt-coursier_2.12_1.0.0-M5/">sbt-coursier_2.12_1.0.0-M5/</a>\n' +
'<a href="sbt-coursier_2.12_1.0.0-M6/">sbt-coursier_2.12_1.0.0-M6/</a>\n',
codeBlock`
<a href="sbt-coursier_2.10_0.13/">sbt-coursier_2.10_0.13/</a>
<a href="sbt-coursier_2.12_1.0/">sbt-coursier_2.12_1.0/</a>
<a href="sbt-coursier_2.12_1.0.0-M5/">sbt-coursier_2.12_1.0.0-M5/</a>
<a href="sbt-coursier_2.12_1.0.0-M6/">sbt-coursier_2.12_1.0.0-M6/</a>
`,
);
httpMock
.scope('https://repo.maven.apache.org')
.get('/maven2/io/get-coursier/sbt-coursier_2.12_1.0/')
.reply(
200,
'<a href="2.0.0-RC2/">2.0.0-RC2/</a>\n' +
'<a href="2.0.0-RC6-1/">2.0.0-RC6-1/</a>\n' +
'<a href="2.0.0-RC6-2/">2.0.0-RC6-2/</a>\n' +
'<a href="2.0.0-RC6-6/">2.0.0-RC6-6/</a>\n',
codeBlock`
<a href="2.0.0-RC2/">2.0.0-RC2/</a>
<a href="2.0.0-RC6-1/">2.0.0-RC6-1/</a>
<a href="2.0.0-RC6-2/">2.0.0-RC6-2/</a>
<a href="2.0.0-RC6-6/">2.0.0-RC6-6/</a>
`,
);
httpMock
.scope('https://repo.maven.apache.org')
Expand All @@ -120,12 +131,14 @@ describe('modules/datasource/sbt-plugin/index', () => {
)
.reply(
200,
'<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\n' +
'<url>https://get-coursier.io/</url>\n' +
'<scm>\n' +
'<url>https://github.com/coursier/sbt-coursier</url>\n' +
'</scm>\n' +
'</project>\n',
codeBlock`
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<url>https://get-coursier.io/</url>
<scm>
<url>https://github.com/coursier/sbt-coursier</url>
</scm>
</project>
`,
);
});

Expand Down

0 comments on commit 5e0c71d

Please sign in to comment.