Suppression code commenté.

This commit is contained in:
Fabrice PENHOËT 2021-10-12 11:03:46 +02:00
parent ec860628e9
commit 3e62258518
1 changed files with 0 additions and 17 deletions

View File

@ -42,23 +42,6 @@ describe("Tests du parseur de JSON", () =>
describe("Accès à des données distantes.", () =>
{
/*it("Si des options sont fournies pour appeler une ressource distante, elles doivent être prises en compte.", async () =>
{
spyOn(window,"fetch").and.callThrough();
parser.datasRemoteSource={ url: "http://localhost:9876/datas/posts.json", withCredentials:true, headers: [{ key:"Authorization", value:"Token YWxhZGRpbjpvcGVuc2VzYW1l" }]};
await parser.parse();
const headers=new Headers();
headers.append("Authorization", "Token YWxhZGRpbjpvcGVuc2VzYW1l");
const credentials : RequestCredentials|undefined="include" ;
const settings={
method: "GET",
headers: headers,
credentials: credentials,
};
expect(fetch).toHaveBeenCalledWith("http://localhost:9876/datas/posts.json", settings);
});*/
it("Doit générer une erreur, si l'accès aux données distantes est défaillant.", async () =>
{
parser.setRemoteSource({ url:"http://localhost:9876/datas/posts.jso" }); // une seule lettre vous manque...