mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 01:41:31 +00:00
Prettier 2.0 (#393)
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import * as HeadersUtility from "./HeadersUtility";
|
||||
import { ExplorerSettings } from "../Shared/ExplorerSettings";
|
||||
import { LocalStorageUtility, StorageKey } from "../Shared/StorageUtility";
|
||||
|
||||
describe("Headers Utility", () => {
|
||||
describe("shouldEnableCrossPartitionKeyForResourceWithPartitionKey()", () => {
|
||||
beforeEach(() => {
|
||||
ExplorerSettings.createDefaultSettings();
|
||||
});
|
||||
|
||||
it("should return true by default", () => {
|
||||
expect(HeadersUtility.shouldEnableCrossPartitionKey()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false if the enable cross partition key feed option is false", () => {
|
||||
LocalStorageUtility.setEntryString(StorageKey.IsCrossPartitionQueryEnabled, "false");
|
||||
expect(HeadersUtility.shouldEnableCrossPartitionKey()).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true if the enable cross partition key feed option is true", () => {
|
||||
LocalStorageUtility.setEntryString(StorageKey.IsCrossPartitionQueryEnabled, "true");
|
||||
expect(HeadersUtility.shouldEnableCrossPartitionKey()).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
import * as HeadersUtility from "./HeadersUtility";
|
||||
import { ExplorerSettings } from "../Shared/ExplorerSettings";
|
||||
import { LocalStorageUtility, StorageKey } from "../Shared/StorageUtility";
|
||||
|
||||
describe("Headers Utility", () => {
|
||||
describe("shouldEnableCrossPartitionKeyForResourceWithPartitionKey()", () => {
|
||||
beforeEach(() => {
|
||||
ExplorerSettings.createDefaultSettings();
|
||||
});
|
||||
|
||||
it("should return true by default", () => {
|
||||
expect(HeadersUtility.shouldEnableCrossPartitionKey()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false if the enable cross partition key feed option is false", () => {
|
||||
LocalStorageUtility.setEntryString(StorageKey.IsCrossPartitionQueryEnabled, "false");
|
||||
expect(HeadersUtility.shouldEnableCrossPartitionKey()).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true if the enable cross partition key feed option is true", () => {
|
||||
LocalStorageUtility.setEntryString(StorageKey.IsCrossPartitionQueryEnabled, "true");
|
||||
expect(HeadersUtility.shouldEnableCrossPartitionKey()).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user