@elastic/search-ui
Advanced tools
Comparing version 1.18.2 to 1.18.3
@@ -39,5 +39,8 @@ "use strict"; | ||
const URLManager_1 = __importDefault(require("../URLManager")); | ||
const DebounceManager_1 = __importDefault(require("../DebounceManager")); | ||
const MockedURLManager = jest.mocked(URLManager_1.default, true); | ||
const MockedCancelByName = jest.spyOn(DebounceManager_1.default.prototype, "cancelByName"); | ||
beforeEach(() => { | ||
MockedURLManager.mockClear(); | ||
MockedCancelByName.mockClear(); | ||
}); | ||
@@ -359,3 +362,3 @@ const mockApiConnector = (0, helpers_1.getMockApiConnector)(); | ||
describe("tearDown", () => { | ||
it("will remove subscriptions and stop listening for URL changes", () => { | ||
it("will remove subscriptions, stop listening for URL changes, and cancel any outstanding pushStateToURL invocations", () => { | ||
const { driver } = (0, helpers_1.setupDriver)(); | ||
@@ -381,2 +384,3 @@ let called1 = false; | ||
.length).toBe(1); | ||
expect(MockedCancelByName).toBeCalledWith("pushStateToURL"); | ||
}); | ||
@@ -383,0 +387,0 @@ }); |
@@ -364,2 +364,3 @@ "use strict"; | ||
this.URLManager && this.URLManager.tearDown(); | ||
this.debounceManager.cancelByName("pushStateToURL"); | ||
} | ||
@@ -366,0 +367,0 @@ /** |
@@ -15,5 +15,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import URLManager from "../URLManager"; | ||
import DebounceManager from "../DebounceManager"; | ||
const MockedURLManager = jest.mocked(URLManager, true); | ||
const MockedCancelByName = jest.spyOn(DebounceManager.prototype, "cancelByName"); | ||
beforeEach(() => { | ||
MockedURLManager.mockClear(); | ||
MockedCancelByName.mockClear(); | ||
}); | ||
@@ -335,3 +338,3 @@ const mockApiConnector = getMockApiConnector(); | ||
describe("tearDown", () => { | ||
it("will remove subscriptions and stop listening for URL changes", () => { | ||
it("will remove subscriptions, stop listening for URL changes, and cancel any outstanding pushStateToURL invocations", () => { | ||
const { driver } = setupDriver(); | ||
@@ -357,2 +360,3 @@ let called1 = false; | ||
.length).toBe(1); | ||
expect(MockedCancelByName).toBeCalledWith("pushStateToURL"); | ||
}); | ||
@@ -359,0 +363,0 @@ }); |
@@ -339,2 +339,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
this.URLManager && this.URLManager.tearDown(); | ||
this.debounceManager.cancelByName("pushStateToURL"); | ||
} | ||
@@ -341,0 +342,0 @@ /** |
{ | ||
"name": "@elastic/search-ui", | ||
"version": "1.18.2", | ||
"version": "1.18.3", | ||
"description": "A Headless Search UI library", | ||
@@ -48,3 +48,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "73f360630f46b801e1f8dcc79835af693d679b00" | ||
"gitHead": "1e9ac2817a179b5caee612342bb69b1ce4e822ab" | ||
} |
437824
10549