just some more use of setupRequestMockHandlers

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-08-24 11:26:12 +02:00
parent 0e9785b260
commit 9212439d15
12 changed files with 29 additions and 32 deletions
+3 -3
View File
@@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { setupRequestMockHandlers } from '@backstage/backend-test-utils';
import {
decodeProtectedHeader,
exportJWK,
@@ -100,9 +102,7 @@ describe('IdentityClient', () => {
let factory: FakeTokenFactory;
const keyDurationSeconds = 5;
beforeAll(() => server.listen({ onUnhandledRequest: 'error' }));
afterAll(() => server.close());
afterEach(() => server.resetHandlers());
setupRequestMockHandlers(server);
beforeEach(() => {
client = IdentityClient.create({ discovery, issuer: mockBaseUrl });