fix: bound metadata work and distinguish cancelled requests (#951)

This commit is contained in:
Thomas Durieux authored and GitHub committed 2026-11-13 11:38:26 +01:00
1 parent ed07ecde73
commit d508ab1754
14 files changed
+202 -16

No files matched your search

+3 -1
View File
@@ -73,8 +73,10 @@ describe('conditional credential validation', () => {
expect(requests[1].headers.authorization).to.equal(`token ${token}`);
status = 401;
expect(await checkToken(token)).to.equal(false);
expect(await checkToken(token)).to.equal(false);
expect(requests).to.have.length(3);
status = 200;
expect(await checkToken(token)).to.equal(true);
expect(await checkToken(token + '-rotated')).to.equal(true);
expect(requests[3].headers['if-none-match']).to.equal(undefined);
expect(requests.every(request => request.url === 'https://api.github.com/user')).to.equal(true);
} finally { global.fetch = originalFetch; }