mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-23 10:51:30 +00:00
* Add additional teaching bubbles in Quickstart * Run npm format * Fix lint error * Add unit tests * Add Mongo teaching bubbles for Try CosmosDB and Launch full screen * Add additional tests for UrlUtility * Run npm format * Add tests for Notebook Utils
24 lines
789 B
TypeScript
24 lines
789 B
TypeScript
import * as InMemoryContentProviderUtils from "./ContentProviders/InMemoryContentProviderUtils";
|
|
|
|
describe("fromContentUri", () => {
|
|
it("fromContentUri should return valid result", () => {
|
|
const contentUri = "memory://resource/path";
|
|
const result = "resource";
|
|
|
|
expect(InMemoryContentProviderUtils.fromContentUri(contentUri)).toEqual(result);
|
|
});
|
|
|
|
it("fromContentUri should return undefined on invalid input", () => {
|
|
const contentUri = "invalid";
|
|
|
|
expect(InMemoryContentProviderUtils.fromContentUri(contentUri)).toEqual(undefined);
|
|
});
|
|
|
|
it("toContentUri should return valid result", () => {
|
|
const path = "resource/path";
|
|
const result = "memory://resource/path";
|
|
|
|
expect(InMemoryContentProviderUtils.toContentUri(path)).toEqual(result);
|
|
});
|
|
});
|