Files
shields/services/nexus/nexus-redirect.tester.js
dependabot[bot] b9d96755ec chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#9357)
* 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>
2023-07-10 09:27:51 +00:00

34 lines
1015 B
JavaScript

import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'NexusRedirect',
title: 'NexusRedirect',
pathPrefix: '/nexus',
})
t.create('Nexus release')
.get('/r/https/oss.sonatype.org/com.google.guava/guava.svg')
.expectRedirect(
`/nexus/r/com.google.guava/guava.svg?server=${encodeURIComponent(
'https://oss.sonatype.org',
)}`,
)
t.create('Nexus snapshot')
.get('/s/https/oss.sonatype.org/com.google.guava/guava.svg')
.expectRedirect(
`/nexus/s/com.google.guava/guava.svg?server=${encodeURIComponent(
'https://oss.sonatype.org',
)}`,
)
t.create('Nexus repository with query opts')
.get(
'/fs-public-snapshots/https/repository.jboss.org/nexus/com.progress.fuse/fusehq:p=tar.gz:c=agent-apple-osx.svg',
)
.expectRedirect(
`/nexus/fs-public-snapshots/com.progress.fuse/fusehq.svg?queryOpt=${encodeURIComponent(
':p=tar.gz:c=agent-apple-osx',
)}&server=${encodeURIComponent('https://repository.jboss.org/nexus')}`,
)