[scenario] Add test for broken oauth client (#12)

* starting on broken auth client

* switch to middleware approach

* add broken example

* fix failure testing

* subset matching
This commit is contained in:
Paul Carleton 2025-11-11 14:17:49 +00:00 • committed by GitHub
commit f95f487ae8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,8 @@
import { describe, test } from '@jest/globals';
import { runClientAgainstScenario } from './helpers/testClient.js';
import {
runClientAgainstScenario,
SpawnedClientRunner
} from './test_helpers/testClient.js';
import path from 'path';
describe('PRM Path-Based Discovery', () => {
@ -8,6 +11,19 @@ describe('PRM Path-Based Discovery', () => {
process.cwd(),
'examples/clients/typescript/auth-test.ts'
);
await runClientAgainstScenario(clientPath, 'auth/basic-dcr');
const runner = new SpawnedClientRunner(clientPath);
await runClientAgainstScenario(runner, 'auth/basic-dcr');
});
test('bad client requests root PRM location', async () => {
const clientPath = path.join(
process.cwd(),
'examples/clients/typescript/auth-test-broken1.ts'
);
const runner = new SpawnedClientRunner(clientPath);
await runClientAgainstScenario(runner, 'auth/basic-dcr', [
// There will be other failures, but this is the one that matters
'prm-priority-order'
]);
});
});