diff --git a/tests/parserForJSONSpec.ts b/tests/parserForJSONSpec.ts index 560e550..b37feb2 100644 --- a/tests/parserForJSONSpec.ts +++ b/tests/parserForJSONSpec.ts @@ -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...