New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clever-frontend-utils

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clever-frontend-utils - npm Package Compare versions

Comparing version

to
2.1.0

4

dist/requestUtils/fetch_test.js

@@ -335,3 +335,3 @@ "use strict";

}
expect(response).toEqual(testResponse);
expect(response).toEqual(testResponse.clone());
});

@@ -373,3 +373,3 @@ Fetch_1.Fetch.on(Fetch_1.Fetch.Event.SUCCESS, mock);

}); });
it("fires an ERROR event for an unsuccessful request", function () { return __awaiter(void 0, void 0, void 0, function () {
test("fires an ERROR event for an unsuccessful request", function () { return __awaiter(void 0, void 0, void 0, function () {
var cb, err_2;

@@ -376,0 +376,0 @@ return __generator(this, function (_a) {

@@ -180,4 +180,6 @@ import { Fetch } from "./Fetch";

});
describe.each(ALL_METHODS)("events for FetchMethod %s", (method) => {
describe.each(ALL_METHODS)("events for FetchMethod %s", (method: Fetch.Method) => {
jest.useFakeTimers();
test("events include request and response information", async () => {

@@ -202,4 +204,5 @@ const testBody = { x: 5 };

}
expect(response).toEqual(testResponse);
expect(response).toEqual(testResponse.clone());
});
Fetch.on(Fetch.Event.SUCCESS, mock);

@@ -216,2 +219,3 @@ fetchMock.once("*", testResponse);

});
test("fires a SUCCESS event for a successful request", async () => {

@@ -225,3 +229,4 @@ const mock = jest.fn();

});
it("fires an ERROR event for an unsuccessful request", async () => {
test("fires an ERROR event for an unsuccessful request", async () => {
expect.assertions(1);

@@ -239,2 +244,3 @@ const cb = jest.fn();

});
test("allows registering multiple handlers for the same event", async () => {

@@ -265,2 +271,3 @@ jest.useFakeTimers();

});
describe("global headers", () => {

@@ -267,0 +274,0 @@ it("applies constant and function global headers", async () => {

{
"name": "clever-frontend-utils",
"version": "2.0.1",
"version": "2.1.0",
"description": "A set of utils for frontend projects at Clever (and potentially elsewhere!)",

@@ -44,3 +44,3 @@ "main": "dist/index.js",

"dependencies": {
"isomorphic-fetch": "^2.2.1",
"isomorphic-fetch": "^3.0.0",
"lodash": "^4.17.10",

@@ -47,0 +47,0 @@ "reselect": "^3.0.1"

Sorry, the diff of this file is not supported yet