conformance/src/scenarios/client/auth/basic-dcr.test.ts
Paul Carleton f95f487ae8
[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
2025-11-11 14:17:49 +00:00

29 lines
950 B
TypeScript

import { describe, test } from '@jest/globals';
import {
runClientAgainstScenario,
SpawnedClientRunner
} from './test_helpers/testClient.js';
import path from 'path';
describe('PRM Path-Based Discovery', () => {
test('client discovers PRM at path-based location before root', async () => {
const clientPath = path.join(
process.cwd(),
'examples/clients/typescript/auth-test.ts'
);
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'
]);
});
});