* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * reformat all the things (prettier 3) * update tests to await calls to prettier.format() --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: chris48s <git@chris-shaw.dev>
66 lines
1.5 KiB
JavaScript
66 lines
1.5 KiB
JavaScript
import { withRegex } from '../test-validators.js'
|
|
import { createServiceTester } from '../tester.js'
|
|
export const t = await createServiceTester()
|
|
|
|
const multipleVersions = withRegex(/^([+]?\d*\.\d+)(-)([+]?\d*\.\d+)$/)
|
|
|
|
t.create('EssentialsX - multiple versions supported - (id 9089)')
|
|
.get('/9089.json')
|
|
.expectBadge({
|
|
label: 'tested versions',
|
|
message: multipleVersions,
|
|
})
|
|
|
|
t.create('Invalid Resource (id 1)').get('/1.json').expectBadge({
|
|
label: 'tested versions',
|
|
message: 'not found',
|
|
})
|
|
|
|
t.create('Nock - single version supported')
|
|
.get('/1.json')
|
|
.intercept(nock =>
|
|
nock('https://api.spiget.org/v2/resources/')
|
|
.get('/1')
|
|
.reply(200, {
|
|
downloads: 1,
|
|
file: {
|
|
type: '.jar',
|
|
size: 1,
|
|
sizeUnit: '1',
|
|
},
|
|
testedVersions: ['1.13'],
|
|
rating: {
|
|
count: 1,
|
|
average: 1,
|
|
},
|
|
}),
|
|
)
|
|
.expectBadge({
|
|
label: 'tested versions',
|
|
message: '1.13',
|
|
})
|
|
|
|
t.create('Nock - multiple versions supported')
|
|
.get('/1.json')
|
|
.intercept(nock =>
|
|
nock('https://api.spiget.org/v2/resources/')
|
|
.get('/1')
|
|
.reply(200, {
|
|
downloads: 1,
|
|
file: {
|
|
type: '.jar',
|
|
size: 1,
|
|
sizeUnit: '1',
|
|
},
|
|
testedVersions: ['1.10', '1.11', '1.12', '1.13'],
|
|
rating: {
|
|
count: 1,
|
|
average: 1,
|
|
},
|
|
}),
|
|
)
|
|
.expectBadge({
|
|
label: 'tested versions',
|
|
message: '1.10-1.13',
|
|
})
|