@fluidframework/map
Advanced tools
Comparing version 0.26.0-3177 to 0.26.0
@@ -10,3 +10,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = __importDefault(require("assert")); | ||
const assert_1 = require("assert"); | ||
const path_1 = __importDefault(require("path")); | ||
@@ -25,3 +25,3 @@ const common_utils_1 = require("@fluidframework/common-utils"); | ||
const posix = path_1.default.posix || path_1.default; | ||
assert_1.default(posix.sep === "/"); | ||
assert_1.strict(posix.sep === "/"); | ||
const snapshotFileName = "header"; | ||
@@ -890,3 +890,3 @@ function serializeDirectory(root) { | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
assert_1.strict(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
const pendingMessageId = localOpMetadata; | ||
@@ -1052,3 +1052,3 @@ if (this.pendingClearMessageId === pendingMessageId) { | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined && localOpMetadata < this.pendingClearMessageId, "Received out of order storage op when there is an unackd clear message"); | ||
assert_1.strict(localOpMetadata !== undefined && localOpMetadata < this.pendingClearMessageId, "Received out of order storage op when there is an unackd clear message"); | ||
} | ||
@@ -1062,3 +1062,3 @@ // If I have a NACK clear, we can ignore all ops. | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
assert_1.strict(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
const pendingMessageId = localOpMetadata; | ||
@@ -1088,3 +1088,3 @@ const pendingKeyMessageId = this.pendingKeys.get(op.key); | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
assert_1.strict(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
const pendingMessageId = localOpMetadata; | ||
@@ -1091,0 +1091,0 @@ const pendingSubDirectoryMessageId = this.pendingSubDirectories.get(op.subdirName); |
@@ -6,7 +6,4 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = __importDefault(require("assert")); | ||
const assert_1 = require("assert"); | ||
const shared_object_base_1 = require("@fluidframework/shared-object-base"); | ||
@@ -413,3 +410,3 @@ const common_utils_1 = require("@fluidframework/common-utils"); | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined && localOpMetadata < this.pendingClearMessageId, "Received out of order op when there is an unackd clear message"); | ||
assert_1.strict(localOpMetadata !== undefined && localOpMetadata < this.pendingClearMessageId, "Received out of order op when there is an unackd clear message"); | ||
} | ||
@@ -423,3 +420,3 @@ // If we have an unack'd clear, we can ignore all ops. | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
assert_1.strict(localOpMetadata !== undefined, `pendingMessageId is missing from the local client's ${op.type} operation`); | ||
const pendingMessageId = localOpMetadata; | ||
@@ -445,3 +442,3 @@ const pendingKeyMessageId = this.pendingKeys.get(op.key); | ||
if (local) { | ||
assert_1.default(localOpMetadata !== undefined, "pendingMessageId is missing from the local client's clear operation"); | ||
assert_1.strict(localOpMetadata !== undefined, "pendingMessageId is missing from the local client's clear operation"); | ||
const pendingMessageId = localOpMetadata; | ||
@@ -448,0 +445,0 @@ if (this.pendingClearMessageId === pendingMessageId) { |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/map"; | ||
export declare const pkgVersion = "0.26.0-3177"; | ||
export declare const pkgVersion = "0.26.0"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -10,3 +10,3 @@ "use strict"; | ||
exports.pkgName = "@fluidframework/map"; | ||
exports.pkgVersion = "0.26.0-3177"; | ||
exports.pkgVersion = "0.26.0"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -6,7 +6,4 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = __importDefault(require("assert")); | ||
const assert_1 = require("assert"); | ||
const protocol_definitions_1 = require("@fluidframework/protocol-definitions"); | ||
@@ -24,5 +21,5 @@ const test_runtime_utils_1 = require("@fluidframework/test-runtime-utils"); | ||
const tree = directory.snapshot(); | ||
assert_1.default(tree.entries.length === 1); | ||
assert_1.default(tree.entries[0].path === "header"); | ||
assert_1.default(tree.entries[0].type === protocol_definitions_1.TreeEntry.Blob); | ||
assert_1.strict(tree.entries.length === 1); | ||
assert_1.strict(tree.entries[0].path === "header"); | ||
assert_1.strict(tree.entries[0].type === protocol_definitions_1.TreeEntry.Blob); | ||
const contents = tree.entries[0].value.contents; | ||
@@ -45,6 +42,6 @@ return JSON.stringify(JSON.parse(contents).content); | ||
it("Can create a new directory", () => { | ||
assert_1.default.ok(directory, "could not create a new directory"); | ||
assert_1.strict.ok(directory, "could not create a new directory"); | ||
}); | ||
it("Knows its absolute path", () => { | ||
assert_1.default.equal(directory.absolutePath, "/", "the absolute path is not correct"); | ||
assert_1.strict.equal(directory.absolutePath, "/", "the absolute path is not correct"); | ||
}); | ||
@@ -54,4 +51,4 @@ it("Can set and get keys one level deep", () => { | ||
directory.set("testKey2", "testValue2"); | ||
assert_1.default.equal(directory.get("testKey"), "testValue", "could not retrieve set key 1"); | ||
assert_1.default.equal(directory.get("testKey2"), "testValue2", "could not retrieve set key 2"); | ||
assert_1.strict.equal(directory.get("testKey"), "testValue", "could not retrieve set key 1"); | ||
assert_1.strict.equal(directory.get("testKey2"), "testValue2", "could not retrieve set key 2"); | ||
}); | ||
@@ -65,10 +62,10 @@ it("should fire correct directory events", async () => { | ||
dummyDirectory.set("dwyane", "johnson"); | ||
assert_1.default.equal(called1, false, "did not receive op event"); | ||
assert_1.default.equal(called2, true, "did not receive valueChanged event"); | ||
assert_1.strict.equal(called1, false, "did not receive op event"); | ||
assert_1.strict.equal(called2, true, "did not receive valueChanged event"); | ||
}); | ||
it("Rejects a undefined and null key set", () => { | ||
assert_1.default.throws(() => { | ||
assert_1.strict.throws(() => { | ||
directory.set(undefined, "testValue"); | ||
}, "Should throw for key of undefined"); | ||
assert_1.default.throws(() => { | ||
assert_1.strict.throws(() => { | ||
directory.set(null, "testValue"); | ||
@@ -78,6 +75,6 @@ }, "Should throw for key of null"); | ||
it("Rejects subdirectories with undefined and null names", () => { | ||
assert_1.default.throws(() => { | ||
assert_1.strict.throws(() => { | ||
directory.createSubDirectory(undefined); | ||
}, "Should throw for undefined subdirectory name"); | ||
assert_1.default.throws(() => { | ||
assert_1.strict.throws(() => { | ||
directory.createSubDirectory(null); | ||
@@ -89,3 +86,3 @@ }, "Should throw for null subdirectory name"); | ||
const serialized = serialize(directory); | ||
assert_1.default.equal(serialized, "{}"); | ||
assert_1.strict.equal(serialized, "{}"); | ||
}); | ||
@@ -102,3 +99,3 @@ it("Should serialize a directory without subdirectories as a JSON object", () => { | ||
const expected = `{"storage":{"first":{"type":"Plain","value":"second"},"third":{"type":"Plain","value":"fourth"},"fifth":{"type":"Plain","value":"sixth"},"object":{"type":"Plain","value":{"type":"__fluid_handle__","url":"${subMapHandleUrl}"}}}}`; | ||
assert_1.default.equal(serialized, expected); | ||
assert_1.strict.equal(serialized, expected); | ||
}); | ||
@@ -120,3 +117,3 @@ it("Should serialize a directory with subdirectories as a JSON object", () => { | ||
const expected = `{"storage":{"first":{"type":"Plain","value":"second"},"third":{"type":"Plain","value":"fourth"},"fifth":{"type":"Plain","value":"sixth"},"object":{"type":"Plain","value":{"type":"__fluid_handle__","url":"${subMapHandleUrl}"}}},"subdirectories":{"nested":{"storage":{"deepKey1":{"type":"Plain","value":"deepValue1"}},"subdirectories":{"nested2":{"subdirectories":{"nested3":{"storage":{"deepKey2":{"type":"Plain","value":"deepValue2"}}}}}}}}}`; | ||
assert_1.default.equal(serialized, expected); | ||
assert_1.strict.equal(serialized, expected); | ||
}); | ||
@@ -127,3 +124,3 @@ it("Should serialize an undefined value", () => { | ||
directory.set("fifth", undefined); | ||
assert_1.default.ok(directory.has("fifth")); | ||
assert_1.strict.ok(directory.has("fifth")); | ||
const subMap = mapFactory.create(dataStoreRuntime, "subMap"); | ||
@@ -134,3 +131,3 @@ directory.set("object", subMap.handle); | ||
nestedDirectory.set("deepKeyUndefined", undefined); | ||
assert_1.default.ok(nestedDirectory.has("deepKeyUndefined")); | ||
assert_1.strict.ok(nestedDirectory.has("deepKeyUndefined")); | ||
nestedDirectory.createSubDirectory("nested2") | ||
@@ -143,3 +140,3 @@ .createSubDirectory("nested3") | ||
const expected = `{"storage":{"first":{"type":"Plain","value":"second"},"third":{"type":"Plain","value":"fourth"},"fifth":{"type":"Plain"},"object":{"type":"Plain","value":{"type":"__fluid_handle__","url":"${subMapHandleUrl}"}}},"subdirectories":{"nested":{"storage":{"deepKey1":{"type":"Plain","value":"deepValue1"},"deepKeyUndefined":{"type":"Plain"}},"subdirectories":{"nested2":{"subdirectories":{"nested3":{"storage":{"deepKey2":{"type":"Plain","value":"deepValue2"}}}}}}}}}`; | ||
assert_1.default.equal(serialized, expected); | ||
assert_1.strict.equal(serialized, expected); | ||
}); | ||
@@ -150,7 +147,7 @@ }); | ||
await populate(directory, {}); | ||
assert_1.default.equal(directory.size, 0, "Failed to initialize to empty directory storage"); | ||
assert_1.strict.equal(directory.size, 0, "Failed to initialize to empty directory storage"); | ||
directory.set("testKey", "testValue"); | ||
assert_1.default.equal(directory.get("testKey"), "testValue", "Failed to set testKey"); | ||
assert_1.strict.equal(directory.get("testKey"), "testValue", "Failed to set testKey"); | ||
directory.createSubDirectory("testSubDir").set("testSubKey", "testSubValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("testSubDir").get("testSubKey"), "testSubValue", "Failed to set testSubKey"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("testSubDir").get("testSubKey"), "testSubValue", "Failed to set testSubKey"); | ||
}); | ||
@@ -192,12 +189,12 @@ it("Should populate the directory from a basic JSON object (old format)", async () => { | ||
}); | ||
assert_1.default.equal(directory.size, 2, "Failed to initialize directory storage correctly"); | ||
assert_1.default.equal(directory.getWorkingDirectory("/foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory.getWorkingDirectory("/bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory.getWorkingDirectory("").get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory.getWorkingDirectory("/").get("testKey2"), "testValue5"); | ||
assert_1.strict.equal(directory.size, 2, "Failed to initialize directory storage correctly"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("").get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/").get("testKey2"), "testValue5"); | ||
directory.set("testKey", "newValue"); | ||
assert_1.default.equal(directory.get("testKey"), "newValue", "Failed to set testKey"); | ||
assert_1.strict.equal(directory.get("testKey"), "newValue", "Failed to set testKey"); | ||
directory.createSubDirectory("testSubDir").set("testSubKey", "newSubValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("testSubDir").get("testSubKey"), "newSubValue", "Failed to set testSubKey"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("testSubDir").get("testSubKey"), "newSubValue", "Failed to set testSubKey"); | ||
}); | ||
@@ -237,14 +234,14 @@ it("Should populate the directory with undefined values (old format)", async () => { | ||
}); | ||
assert_1.default.equal(directory.size, 2, "Failed to initialize directory storage correctly"); | ||
assert_1.default.equal(directory.getWorkingDirectory("/foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.default.equal(directory.getWorkingDirectory("/bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory.getWorkingDirectory("").get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory.getWorkingDirectory("/").get("testKey2"), undefined); | ||
assert_1.default.ok(directory.has("testKey2")); | ||
assert_1.default.ok(directory.getWorkingDirectory("/foo").has("testKey2")); | ||
assert_1.strict.equal(directory.size, 2, "Failed to initialize directory storage correctly"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("").get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/").get("testKey2"), undefined); | ||
assert_1.strict.ok(directory.has("testKey2")); | ||
assert_1.strict.ok(directory.getWorkingDirectory("/foo").has("testKey2")); | ||
directory.set("testKey", "newValue"); | ||
assert_1.default.equal(directory.get("testKey"), "newValue", "Failed to set testKey"); | ||
assert_1.strict.equal(directory.get("testKey"), "newValue", "Failed to set testKey"); | ||
directory.createSubDirectory("testSubDir").set("testSubKey", "newSubValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("testSubDir").get("testSubKey"), "newSubValue", "Failed to set testSubKey"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("testSubDir").get("testSubKey"), "newSubValue", "Failed to set testSubKey"); | ||
}); | ||
@@ -264,16 +261,16 @@ it("Should populate, serialize and de-serialize directory with long property values", async () => { | ||
const tree = directory.snapshot(); | ||
assert_1.default(tree.entries.length === 3); | ||
assert_1.default(tree.entries[0].path === "blob0"); | ||
assert_1.default(tree.entries[1].path === "blob1"); | ||
assert_1.default(tree.entries[2].path === "header"); | ||
assert_1.default(tree.entries[0].value.contents.length >= 1024); | ||
assert_1.default(tree.entries[1].value.contents.length >= 1024); | ||
assert_1.default(tree.entries[2].value.contents.length <= 200); | ||
assert_1.strict(tree.entries.length === 3); | ||
assert_1.strict(tree.entries[0].path === "blob0"); | ||
assert_1.strict(tree.entries[1].path === "blob1"); | ||
assert_1.strict(tree.entries[2].path === "header"); | ||
assert_1.strict(tree.entries[0].value.contents.length >= 1024); | ||
assert_1.strict(tree.entries[1].value.contents.length >= 1024); | ||
assert_1.strict(tree.entries[2].value.contents.length <= 200); | ||
const directory2 = new directory_1.SharedDirectory("test", dataStoreRuntime, directory_1.DirectoryFactory.Attributes); | ||
const storage = test_runtime_utils_1.MockSharedObjectServices.createFromTree(tree); | ||
await directory2.load("branchId", storage); | ||
assert_1.default.equal(directory2.get("first"), "second"); | ||
assert_1.default.equal(directory2.get("long1"), longWord); | ||
assert_1.default.equal(directory2.getWorkingDirectory("/nested").get("deepKey1"), "deepValue1"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("/nested").get("long2"), logWord2); | ||
assert_1.strict.equal(directory2.get("first"), "second"); | ||
assert_1.strict.equal(directory2.get("long1"), longWord); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("/nested").get("deepKey1"), "deepValue1"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("/nested").get("long2"), logWord2); | ||
}); | ||
@@ -319,4 +316,4 @@ }); | ||
// Verify that both the directories have the key. | ||
assert_1.default.equal(directory.get(key), value, "The first directory does not have the key"); | ||
assert_1.default.equal(directory2.get(key), value, "The second directory does not have the key"); | ||
assert_1.strict.equal(directory.get(key), value, "The first directory does not have the key"); | ||
assert_1.strict.equal(directory2.get(key), value, "The second directory does not have the key"); | ||
// Set a new value for the same key in the second SharedDirectory. | ||
@@ -328,4 +325,4 @@ const newValue = "newvalue"; | ||
// Verify that both the directories get the new value. | ||
assert_1.default.equal(directory.get(key), newValue, "The first directory did not get the new value"); | ||
assert_1.default.equal(directory2.get(key), newValue, "The second directory did not get the new value"); | ||
assert_1.strict.equal(directory.get(key), newValue, "The first directory did not get the new value"); | ||
assert_1.strict.equal(directory2.get(key), newValue, "The second directory did not get the new value"); | ||
}); | ||
@@ -355,4 +352,4 @@ it("should correctly process a sub directory operation sent in local state", async () => { | ||
// Verify that both the directories have the key. | ||
assert_1.default.ok(directory.getSubDirectory(subDirName), "The first directory does not have the sub directory"); | ||
assert_1.default.ok(directory2.getSubDirectory(subDirName), "The second directory does not have the sub directory"); | ||
assert_1.strict.ok(directory.getSubDirectory(subDirName), "The first directory does not have the sub directory"); | ||
assert_1.strict.ok(directory2.getSubDirectory(subDirName), "The second directory does not have the sub directory"); | ||
// Delete the subdirectory in the second SharedDirectory. | ||
@@ -363,4 +360,4 @@ directory2.deleteSubDirectory(subDirName); | ||
// Verify that both the directory have the sub directory deleted. | ||
assert_1.default.equal(directory.getSubDirectory(subDirName), undefined, "The first directory did not process the delete"); | ||
assert_1.default.equal(directory2.getSubDirectory(subDirName), undefined, "The second directory did not process the delete"); | ||
assert_1.strict.equal(directory.getSubDirectory(subDirName), undefined, "The first directory did not process the delete"); | ||
assert_1.strict.equal(directory2.getSubDirectory(subDirName), undefined, "The second directory did not process the delete"); | ||
}); | ||
@@ -395,5 +392,5 @@ }); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.get("testKey"), "testValue", "could not retrieve key"); | ||
assert_1.strict.equal(directory.get("testKey"), "testValue", "could not retrieve key"); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.get("testKey"), "testValue", "could not retrieve key from remote directory"); | ||
assert_1.strict.equal(directory2.get("testKey"), "testValue", "could not retrieve key from remote directory"); | ||
}); | ||
@@ -408,9 +405,9 @@ it("Can set and get keys two levels deep", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("foo/").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo/").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo/").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo/").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
}); | ||
@@ -430,13 +427,13 @@ }); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.getWorkingDirectory("/foo/").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("./foo").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory.get("testKey"), undefined); | ||
assert_1.default.equal(directory.get("testKey2"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("/foo/").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("./foo").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory.get("testKey"), undefined); | ||
assert_1.strict.equal(directory.get("testKey2"), undefined); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.getWorkingDirectory("/foo/").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("./foo").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory2.get("testKey"), undefined); | ||
assert_1.default.equal(directory2.get("testKey2"), undefined); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("/foo/").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("./foo").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory2.get("testKey"), undefined); | ||
assert_1.strict.equal(directory2.get("testKey2"), undefined); | ||
}); | ||
@@ -454,13 +451,13 @@ it("Can delete keys from the root", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory.get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory.get("testKey2"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory.get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory.get("testKey2"), undefined); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey2"), "testValue2"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory2.get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory2.get("testKey2"), undefined); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory2.get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory2.get("testKey2"), undefined); | ||
}); | ||
@@ -473,10 +470,10 @@ }); | ||
// Verify the local SharedDirectory | ||
assert_1.default.ok(directory.has("test")); | ||
assert_1.strict.ok(directory.has("test")); | ||
await directory.wait("test"); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.ok(directory2.has("test")); | ||
assert_1.strict.ok(directory2.has("test")); | ||
await directory2.wait("test"); | ||
}); | ||
it("Should resolve returned promise once unavailable key is available", async () => { | ||
assert_1.default.ok(!directory.has("test")); | ||
assert_1.strict.ok(!directory.has("test")); | ||
const waitP = directory.wait("test"); | ||
@@ -500,10 +497,10 @@ const waitP2 = directory2.wait("test"); | ||
for (const [subDirName] of directory.subdirectories()) { | ||
assert_1.default.ok(expectedDirectories.has(subDirName)); | ||
assert_1.strict.ok(expectedDirectories.has(subDirName)); | ||
} | ||
// Verify the remote SharedDirectory | ||
for (const [subDirName] of directory2.subdirectories()) { | ||
assert_1.default.ok(expectedDirectories.has(subDirName)); | ||
assert_1.strict.ok(expectedDirectories.has(subDirName)); | ||
expectedDirectories.delete(subDirName); | ||
} | ||
assert_1.default.ok(expectedDirectories.size === 0); | ||
assert_1.strict.ok(expectedDirectories.size === 0); | ||
}); | ||
@@ -518,7 +515,7 @@ it("Can get a subdirectory", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.ok(directory.getWorkingDirectory("/foo")); | ||
assert_1.default.ok(directory.getSubDirectory("foo")); | ||
assert_1.strict.ok(directory.getWorkingDirectory("/foo")); | ||
assert_1.strict.ok(directory.getSubDirectory("foo")); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.ok(directory2.getWorkingDirectory("/foo")); | ||
assert_1.default.ok(directory2.getSubDirectory("foo")); | ||
assert_1.strict.ok(directory2.getWorkingDirectory("/foo")); | ||
assert_1.strict.ok(directory2.getSubDirectory("foo")); | ||
}); | ||
@@ -530,9 +527,9 @@ it("Knows its absolute path", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(fooDirectory.absolutePath, "/foo"); | ||
assert_1.default.equal(barDirectory.absolutePath, "/foo/bar"); | ||
assert_1.strict.equal(fooDirectory.absolutePath, "/foo"); | ||
assert_1.strict.equal(barDirectory.absolutePath, "/foo/bar"); | ||
// Verify the remote SharedDirectory | ||
const fooDirectory2 = directory2.getSubDirectory("foo"); | ||
const barDirectory2 = fooDirectory2.getSubDirectory("bar"); | ||
assert_1.default.equal(fooDirectory2.absolutePath, "/foo"); | ||
assert_1.default.equal(barDirectory2.absolutePath, "/foo/bar"); | ||
assert_1.strict.equal(fooDirectory2.absolutePath, "/foo"); | ||
assert_1.strict.equal(barDirectory2.absolutePath, "/foo/bar"); | ||
}); | ||
@@ -548,14 +545,14 @@ it("Can get and set keys from a subdirectory using relative paths", () => { | ||
const testSubdir = directory.getWorkingDirectory("/foo"); | ||
assert_1.default.equal(testSubdir.has("testKey"), true); | ||
assert_1.default.equal(testSubdir.has("garbage"), false); | ||
assert_1.default.equal(testSubdir.get("testKey"), "testValue"); | ||
assert_1.default.equal(testSubdir.get("testKey2"), "testValue2"); | ||
assert_1.default.equal(testSubdir.get("testKey3"), undefined); | ||
assert_1.strict.equal(testSubdir.has("testKey"), true); | ||
assert_1.strict.equal(testSubdir.has("garbage"), false); | ||
assert_1.strict.equal(testSubdir.get("testKey"), "testValue"); | ||
assert_1.strict.equal(testSubdir.get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(testSubdir.get("testKey3"), undefined); | ||
// Verify the remote SharedDirectory | ||
const barSubDir = directory2.getWorkingDirectory("/foo"); | ||
assert_1.default.equal(barSubDir.has("testKey"), true); | ||
assert_1.default.equal(barSubDir.has("garbage"), false); | ||
assert_1.default.equal(barSubDir.get("testKey"), "testValue"); | ||
assert_1.default.equal(barSubDir.get("testKey2"), "testValue2"); | ||
assert_1.default.equal(barSubDir.get("testKey3"), undefined); | ||
assert_1.strict.equal(barSubDir.has("testKey"), true); | ||
assert_1.strict.equal(barSubDir.has("garbage"), false); | ||
assert_1.strict.equal(barSubDir.get("testKey"), "testValue"); | ||
assert_1.strict.equal(barSubDir.get("testKey2"), "testValue2"); | ||
assert_1.strict.equal(barSubDir.get("testKey3"), undefined); | ||
// Set value in sub directory. | ||
@@ -565,5 +562,5 @@ testSubdir.set("fromSubdir", "testValue4"); | ||
// Verify the local sub directory | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("fromSubdir"), "testValue4"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("fromSubdir"), "testValue4"); | ||
// Verify the remote sub directory | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("fromSubdir"), "testValue4"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("fromSubdir"), "testValue4"); | ||
}); | ||
@@ -582,13 +579,13 @@ it("Can be cleared from the subdirectory", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey"), undefined); | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.default.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory.getWorkingDirectory("..").get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory.getWorkingDirectory(".").get("testKey2"), "testValue5"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("..").get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory.getWorkingDirectory(".").get("testKey2"), "testValue5"); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey"), undefined); | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.default.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("..").get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory2.getWorkingDirectory(".").get("testKey2"), "testValue5"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey"), undefined); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("bar").get("testKey3"), "testValue3"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("..").get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory(".").get("testKey2"), "testValue5"); | ||
}); | ||
@@ -609,13 +606,13 @@ it("Can delete keys from the subdirectory", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.default.equal(directory.getWorkingDirectory("bar").get("testKey3"), undefined); | ||
assert_1.default.equal(directory.get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory.get("testKey2"), "testValue5"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("bar").get("testKey3"), undefined); | ||
assert_1.strict.equal(directory.get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory.get("testKey2"), "testValue5"); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.default.equal(directory2.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.default.equal(directory2.getWorkingDirectory("bar").get("testKey3"), undefined); | ||
assert_1.default.equal(directory2.get("testKey"), "testValue4"); | ||
assert_1.default.equal(directory2.get("testKey2"), "testValue5"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey"), "testValue"); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("foo").get("testKey2"), undefined); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("bar").get("testKey3"), undefined); | ||
assert_1.strict.equal(directory2.get("testKey"), "testValue4"); | ||
assert_1.strict.equal(directory2.get("testKey2"), "testValue5"); | ||
}); | ||
@@ -633,36 +630,36 @@ it("Knows the size of the subdirectory", () => { | ||
const testSubdirFoo = directory.getWorkingDirectory("/foo"); | ||
assert_1.default.equal(testSubdirFoo.size, 2); | ||
assert_1.strict.equal(testSubdirFoo.size, 2); | ||
// Verify the remote SharedDirectory | ||
const testSubdirFoo2 = directory2.getWorkingDirectory("/foo"); | ||
assert_1.default.equal(testSubdirFoo2.size, 2); | ||
assert_1.strict.equal(testSubdirFoo2.size, 2); | ||
testSubdirFoo.delete("testKey2"); | ||
containerRuntimeFactory.processAllMessages(); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(testSubdirFoo.size, 1); | ||
assert_1.strict.equal(testSubdirFoo.size, 1); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(testSubdirFoo2.size, 1); | ||
assert_1.strict.equal(testSubdirFoo2.size, 1); | ||
directory.delete("testKey"); | ||
containerRuntimeFactory.processAllMessages(); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(testSubdirFoo.size, 1); | ||
assert_1.strict.equal(testSubdirFoo.size, 1); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(testSubdirFoo2.size, 1); | ||
assert_1.strict.equal(testSubdirFoo2.size, 1); | ||
const testSubdirBar = directory.getWorkingDirectory("/bar"); | ||
testSubdirBar.delete("testKey3"); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(testSubdirFoo.size, 1); | ||
assert_1.strict.equal(testSubdirFoo.size, 1); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(testSubdirFoo2.size, 1); | ||
assert_1.strict.equal(testSubdirFoo2.size, 1); | ||
directory.clear(); | ||
containerRuntimeFactory.processAllMessages(); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(testSubdirFoo.size, 1); | ||
assert_1.strict.equal(testSubdirFoo.size, 1); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(testSubdirFoo2.size, 1); | ||
assert_1.strict.equal(testSubdirFoo2.size, 1); | ||
testSubdirFoo.clear(); | ||
containerRuntimeFactory.processAllMessages(); | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(testSubdirFoo.size, 0); | ||
assert_1.strict.equal(testSubdirFoo.size, 0); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(testSubdirFoo2.size, 0); | ||
assert_1.strict.equal(testSubdirFoo2.size, 0); | ||
}); | ||
@@ -680,12 +677,12 @@ it("Can get a subdirectory from a subdirectory", () => { | ||
const barSubdir = directory.getWorkingDirectory("/bar"); | ||
assert_1.default.ok(barSubdir); | ||
assert_1.strict.ok(barSubdir); | ||
const bazSubDir = barSubdir.getWorkingDirectory("./baz"); | ||
assert_1.default.ok(bazSubDir); | ||
assert_1.default.equal(bazSubDir.get("testKey4"), "testValue4"); | ||
assert_1.strict.ok(bazSubDir); | ||
assert_1.strict.equal(bazSubDir.get("testKey4"), "testValue4"); | ||
// Verify the remote SharedDirectory | ||
const barSubdir2 = directory2.getWorkingDirectory("/bar"); | ||
assert_1.default.ok(barSubdir2); | ||
assert_1.strict.ok(barSubdir2); | ||
const bazSubDir2 = barSubdir2.getWorkingDirectory("./baz"); | ||
assert_1.default.ok(bazSubDir2); | ||
assert_1.default.equal(bazSubDir2.get("testKey4"), "testValue4"); | ||
assert_1.strict.ok(bazSubDir2); | ||
assert_1.strict.equal(bazSubDir2.get("testKey4"), "testValue4"); | ||
}); | ||
@@ -703,6 +700,6 @@ it("Can delete a child subdirectory", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(barDirectory.getWorkingDirectory("baz"), undefined); | ||
assert_1.strict.equal(barDirectory.getWorkingDirectory("baz"), undefined); | ||
// Verify the remote SharedDirectory | ||
const barDirectory2 = directory2.getSubDirectory("bar"); | ||
assert_1.default.equal(barDirectory2.getWorkingDirectory("baz"), undefined); | ||
assert_1.strict.equal(barDirectory2.getWorkingDirectory("baz"), undefined); | ||
}); | ||
@@ -720,5 +717,5 @@ it("Can delete a child subdirectory with children", () => { | ||
// Verify the local SharedDirectory | ||
assert_1.default.equal(directory.getWorkingDirectory("bar"), undefined); | ||
assert_1.strict.equal(directory.getWorkingDirectory("bar"), undefined); | ||
// Verify the remote SharedDirectory | ||
assert_1.default.equal(directory2.getWorkingDirectory("bar"), undefined); | ||
assert_1.strict.equal(directory2.getWorkingDirectory("bar"), undefined); | ||
}); | ||
@@ -738,18 +735,18 @@ it("Can get and use a keys iterator", () => { | ||
const fooSubDirResult1 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult1.value, "testKey"); | ||
assert_1.default.equal(fooSubDirResult1.done, false); | ||
assert_1.strict.equal(fooSubDirResult1.value, "testKey"); | ||
assert_1.strict.equal(fooSubDirResult1.done, false); | ||
const fooSubDirResult2 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult2.value, "testKey2"); | ||
assert_1.default.equal(fooSubDirResult2.done, false); | ||
assert_1.strict.equal(fooSubDirResult2.value, "testKey2"); | ||
assert_1.strict.equal(fooSubDirResult2.done, false); | ||
const fooSubDirResult3 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult3.value, undefined); | ||
assert_1.default.equal(fooSubDirResult3.done, true); | ||
assert_1.strict.equal(fooSubDirResult3.value, undefined); | ||
assert_1.strict.equal(fooSubDirResult3.done, true); | ||
const barSubDir = directory.getWorkingDirectory("/bar"); | ||
const barSubDirIterator = barSubDir.keys(); | ||
const barSubDirResult1 = barSubDirIterator.next(); | ||
assert_1.default.equal(barSubDirResult1.value, "testKey3"); | ||
assert_1.default.equal(barSubDirResult1.done, false); | ||
assert_1.strict.equal(barSubDirResult1.value, "testKey3"); | ||
assert_1.strict.equal(barSubDirResult1.done, false); | ||
const barSubDirResult2 = barSubDirIterator.next(); | ||
assert_1.default.equal(barSubDirResult2.value, undefined); | ||
assert_1.default.equal(barSubDirResult2.done, true); | ||
assert_1.strict.equal(barSubDirResult2.value, undefined); | ||
assert_1.strict.equal(barSubDirResult2.done, true); | ||
// Verify the remote SharedDirectory | ||
@@ -759,18 +756,18 @@ const fooSubDir2 = directory2.getWorkingDirectory("/foo"); | ||
const fooSubDir2Result1 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result1.value, "testKey"); | ||
assert_1.default.equal(fooSubDir2Result1.done, false); | ||
assert_1.strict.equal(fooSubDir2Result1.value, "testKey"); | ||
assert_1.strict.equal(fooSubDir2Result1.done, false); | ||
const fooSubDir2Result2 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result2.value, "testKey2"); | ||
assert_1.default.equal(fooSubDir2Result2.done, false); | ||
assert_1.strict.equal(fooSubDir2Result2.value, "testKey2"); | ||
assert_1.strict.equal(fooSubDir2Result2.done, false); | ||
const fooSubDir2Result3 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result3.value, undefined); | ||
assert_1.default.equal(fooSubDir2Result3.done, true); | ||
assert_1.strict.equal(fooSubDir2Result3.value, undefined); | ||
assert_1.strict.equal(fooSubDir2Result3.done, true); | ||
const barSubDir2 = directory2.getWorkingDirectory("/bar"); | ||
const barSubDir2Iterator = barSubDir2.keys(); | ||
const barSubDir2Result1 = barSubDir2Iterator.next(); | ||
assert_1.default.equal(barSubDir2Result1.value, "testKey3"); | ||
assert_1.default.equal(barSubDir2Result1.done, false); | ||
assert_1.strict.equal(barSubDir2Result1.value, "testKey3"); | ||
assert_1.strict.equal(barSubDir2Result1.done, false); | ||
const barSubDir2Result2 = barSubDir2Iterator.next(); | ||
assert_1.default.equal(barSubDir2Result2.value, undefined); | ||
assert_1.default.equal(barSubDir2Result2.done, true); | ||
assert_1.strict.equal(barSubDir2Result2.value, undefined); | ||
assert_1.strict.equal(barSubDir2Result2.done, true); | ||
}); | ||
@@ -790,18 +787,18 @@ it("Can get and use a values iterator", () => { | ||
const fooSubDirResult1 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult1.value, "testValue"); | ||
assert_1.default.equal(fooSubDirResult1.done, false); | ||
assert_1.strict.equal(fooSubDirResult1.value, "testValue"); | ||
assert_1.strict.equal(fooSubDirResult1.done, false); | ||
const fooSubDirResult2 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult2.value, "testValue2"); | ||
assert_1.default.equal(fooSubDirResult2.done, false); | ||
assert_1.strict.equal(fooSubDirResult2.value, "testValue2"); | ||
assert_1.strict.equal(fooSubDirResult2.done, false); | ||
const fooSubDirResult3 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult3.value, undefined); | ||
assert_1.default.equal(fooSubDirResult3.done, true); | ||
assert_1.strict.equal(fooSubDirResult3.value, undefined); | ||
assert_1.strict.equal(fooSubDirResult3.done, true); | ||
const barSubDir = directory.getWorkingDirectory("/bar"); | ||
const barSubDirIterator = barSubDir.values(); | ||
const barSubDirResult1 = barSubDirIterator.next(); | ||
assert_1.default.equal(barSubDirResult1.value, "testValue3"); | ||
assert_1.default.equal(barSubDirResult1.done, false); | ||
assert_1.strict.equal(barSubDirResult1.value, "testValue3"); | ||
assert_1.strict.equal(barSubDirResult1.done, false); | ||
const barSubDirResult2 = barSubDirIterator.next(); | ||
assert_1.default.equal(barSubDirResult2.value, undefined); | ||
assert_1.default.equal(barSubDirResult2.done, true); | ||
assert_1.strict.equal(barSubDirResult2.value, undefined); | ||
assert_1.strict.equal(barSubDirResult2.done, true); | ||
// Verify the remote SharedDirectory | ||
@@ -811,18 +808,18 @@ const fooSubDir2 = directory2.getWorkingDirectory("/foo"); | ||
const fooSubDir2Result1 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result1.value, "testValue"); | ||
assert_1.default.equal(fooSubDir2Result1.done, false); | ||
assert_1.strict.equal(fooSubDir2Result1.value, "testValue"); | ||
assert_1.strict.equal(fooSubDir2Result1.done, false); | ||
const fooSubDir2Result2 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result2.value, "testValue2"); | ||
assert_1.default.equal(fooSubDir2Result2.done, false); | ||
assert_1.strict.equal(fooSubDir2Result2.value, "testValue2"); | ||
assert_1.strict.equal(fooSubDir2Result2.done, false); | ||
const fooSubDir2Result3 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result3.value, undefined); | ||
assert_1.default.equal(fooSubDir2Result3.done, true); | ||
assert_1.strict.equal(fooSubDir2Result3.value, undefined); | ||
assert_1.strict.equal(fooSubDir2Result3.done, true); | ||
const barSubDir2 = directory2.getWorkingDirectory("/bar"); | ||
const barSubDir2Iterator = barSubDir2.values(); | ||
const barSubDir2Result1 = barSubDir2Iterator.next(); | ||
assert_1.default.equal(barSubDir2Result1.value, "testValue3"); | ||
assert_1.default.equal(barSubDir2Result1.done, false); | ||
assert_1.strict.equal(barSubDir2Result1.value, "testValue3"); | ||
assert_1.strict.equal(barSubDir2Result1.done, false); | ||
const barSubDir2Result2 = barSubDir2Iterator.next(); | ||
assert_1.default.equal(barSubDir2Result2.value, undefined); | ||
assert_1.default.equal(barSubDir2Result2.done, true); | ||
assert_1.strict.equal(barSubDir2Result2.value, undefined); | ||
assert_1.strict.equal(barSubDir2Result2.done, true); | ||
}); | ||
@@ -842,19 +839,19 @@ it("Can get and use an entries iterator", () => { | ||
const fooSubDirResult1 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult1.value[0], "testKey"); | ||
assert_1.default.equal(fooSubDirResult1.value[1], "testValue"); | ||
assert_1.default.equal(fooSubDirResult1.done, false); | ||
assert_1.strict.equal(fooSubDirResult1.value[0], "testKey"); | ||
assert_1.strict.equal(fooSubDirResult1.value[1], "testValue"); | ||
assert_1.strict.equal(fooSubDirResult1.done, false); | ||
const fooSubDirResult2 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult2.value[0], "testKey2"); | ||
assert_1.default.equal(fooSubDirResult2.value[1], "testValue2"); | ||
assert_1.default.equal(fooSubDirResult2.done, false); | ||
assert_1.strict.equal(fooSubDirResult2.value[0], "testKey2"); | ||
assert_1.strict.equal(fooSubDirResult2.value[1], "testValue2"); | ||
assert_1.strict.equal(fooSubDirResult2.done, false); | ||
const fooSubDirResult3 = fooSubDirIterator.next(); | ||
assert_1.default.equal(fooSubDirResult3.value, undefined); | ||
assert_1.default.equal(fooSubDirResult3.done, true); | ||
assert_1.strict.equal(fooSubDirResult3.value, undefined); | ||
assert_1.strict.equal(fooSubDirResult3.done, true); | ||
const barSubDir = directory.getWorkingDirectory("/bar"); | ||
const expectedEntries = new Set(["testKey3"]); | ||
for (const entry of barSubDir) { | ||
assert_1.default.ok(expectedEntries.has(entry[0])); | ||
assert_1.strict.ok(expectedEntries.has(entry[0])); | ||
expectedEntries.delete(entry[0]); | ||
} | ||
assert_1.default.ok(expectedEntries.size === 0); | ||
assert_1.strict.ok(expectedEntries.size === 0); | ||
// Verify the remote SharedDirectory | ||
@@ -864,19 +861,19 @@ const fooSubDir2 = directory2.getWorkingDirectory("/foo"); | ||
const fooSubDir2Result1 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result1.value[0], "testKey"); | ||
assert_1.default.equal(fooSubDir2Result1.value[1], "testValue"); | ||
assert_1.default.equal(fooSubDir2Result1.done, false); | ||
assert_1.strict.equal(fooSubDir2Result1.value[0], "testKey"); | ||
assert_1.strict.equal(fooSubDir2Result1.value[1], "testValue"); | ||
assert_1.strict.equal(fooSubDir2Result1.done, false); | ||
const fooSubDir2Result2 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result2.value[0], "testKey2"); | ||
assert_1.default.equal(fooSubDir2Result2.value[1], "testValue2"); | ||
assert_1.default.equal(fooSubDir2Result2.done, false); | ||
assert_1.strict.equal(fooSubDir2Result2.value[0], "testKey2"); | ||
assert_1.strict.equal(fooSubDir2Result2.value[1], "testValue2"); | ||
assert_1.strict.equal(fooSubDir2Result2.done, false); | ||
const fooSubDir2Result3 = fooSubDir2Iterator.next(); | ||
assert_1.default.equal(fooSubDir2Result3.value, undefined); | ||
assert_1.default.equal(fooSubDir2Result3.done, true); | ||
assert_1.strict.equal(fooSubDir2Result3.value, undefined); | ||
assert_1.strict.equal(fooSubDir2Result3.done, true); | ||
const barSubDir2 = directory2.getWorkingDirectory("/bar"); | ||
const expectedEntries2 = new Set(["testKey3"]); | ||
for (const entry of barSubDir2) { | ||
assert_1.default.ok(expectedEntries2.has(entry[0])); | ||
assert_1.strict.ok(expectedEntries2.has(entry[0])); | ||
expectedEntries2.delete(entry[0]); | ||
} | ||
assert_1.default.ok(expectedEntries2.size === 0); | ||
assert_1.strict.ok(expectedEntries2.size === 0); | ||
}); | ||
@@ -891,6 +888,6 @@ it("Can iterate over its subdirectories", () => { | ||
for (const [subDirName] of fooDirectory.subdirectories()) { | ||
assert_1.default.ok(expectedDirectories.has(subDirName)); | ||
assert_1.strict.ok(expectedDirectories.has(subDirName)); | ||
expectedDirectories.delete(subDirName); | ||
} | ||
assert_1.default.ok(expectedDirectories.size === 0); | ||
assert_1.strict.ok(expectedDirectories.size === 0); | ||
// Verify the remote SharedDirectory | ||
@@ -900,6 +897,6 @@ const fooDirectory2 = directory2.getSubDirectory("foo"); | ||
for (const [subDirName] of fooDirectory2.subdirectories()) { | ||
assert_1.default.ok(expectedDirectories2.has(subDirName)); | ||
assert_1.strict.ok(expectedDirectories2.has(subDirName)); | ||
expectedDirectories2.delete(subDirName); | ||
} | ||
assert_1.default.ok(expectedDirectories2.size === 0); | ||
assert_1.strict.ok(expectedDirectories2.size === 0); | ||
}); | ||
@@ -906,0 +903,0 @@ }); |
@@ -6,7 +6,4 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = __importDefault(require("assert")); | ||
const assert_1 = require("assert"); | ||
const test_runtime_utils_1 = require("@fluidframework/test-runtime-utils"); | ||
@@ -28,3 +25,3 @@ const map_1 = require("../map"); | ||
it("Can create a new map", () => { | ||
assert_1.default.ok(map, "could not create a new map"); | ||
assert_1.strict.ok(map, "could not create a new map"); | ||
}); | ||
@@ -34,4 +31,4 @@ it("Can set and get map data", async () => { | ||
map.set("testKey2", "testValue2"); | ||
assert_1.default.equal(map.get("testKey"), "testValue", "could not retrieve set key 1"); | ||
assert_1.default.equal(map.get("testKey2"), "testValue2", "could not retreive set key 2"); | ||
assert_1.strict.equal(map.get("testKey"), "testValue", "could not retrieve set key 1"); | ||
assert_1.strict.equal(map.get("testKey2"), "testValue2", "could not retreive set key 2"); | ||
}); | ||
@@ -45,13 +42,13 @@ it("should fire correct map events", async () => { | ||
dummyMap.set("marco", "polo"); | ||
assert_1.default.equal(called1, false, "did not receive op event"); | ||
assert_1.default.equal(called2, true, "did not receive valueChanged event"); | ||
assert_1.strict.equal(called1, false, "did not receive op event"); | ||
assert_1.strict.equal(called2, true, "did not receive valueChanged event"); | ||
}); | ||
it("Should return undefined when a key does not exist in the map", () => { | ||
assert_1.default.equal(map.get("missing"), undefined, "get() did not return undefined for missing key"); | ||
assert_1.strict.equal(map.get("missing"), undefined, "get() did not return undefined for missing key"); | ||
}); | ||
it("Should reject undefined and null key sets", () => { | ||
assert_1.default.throws(() => { | ||
assert_1.strict.throws(() => { | ||
map.set(undefined, "one"); | ||
}, "Should throw for key of undefined"); | ||
assert_1.default.throws(() => { | ||
assert_1.strict.throws(() => { | ||
map.set(null, "two"); | ||
@@ -70,8 +67,8 @@ }, "Should throw for key of null"); | ||
if (!value.IFluidHandle) { | ||
assert_1.default.equal(parsed[key].type, "Plain"); | ||
assert_1.default.equal(parsed[key].value, value); | ||
assert_1.strict.equal(parsed[key].type, "Plain"); | ||
assert_1.strict.equal(parsed[key].value, value); | ||
} | ||
else { | ||
assert_1.default.equal(parsed[key].type, "Plain"); | ||
assert_1.default.equal(parsed[key].value.url, subMap.handle.absolutePath); | ||
assert_1.strict.equal(parsed[key].type, "Plain"); | ||
assert_1.strict.equal(parsed[key].value.url, subMap.handle.absolutePath); | ||
} | ||
@@ -84,3 +81,3 @@ }); | ||
map.set("fifth", undefined); | ||
assert_1.default.ok(map.has("fifth")); | ||
assert_1.strict.ok(map.has("fifth")); | ||
const subMap = factory.create(dataStoreRuntime, "subMap"); | ||
@@ -91,8 +88,8 @@ map.set("object", subMap.handle); | ||
if (!value || !value.IFluidHandle) { | ||
assert_1.default.equal(parsed[key].type, "Plain"); | ||
assert_1.default.equal(parsed[key].value, value); | ||
assert_1.strict.equal(parsed[key].type, "Plain"); | ||
assert_1.strict.equal(parsed[key].value, value); | ||
} | ||
else { | ||
assert_1.default.equal(parsed[key].type, "Plain"); | ||
assert_1.default.equal(parsed[key].value.url, subMap.handle.absolutePath); | ||
assert_1.strict.equal(parsed[key].type, "Plain"); | ||
assert_1.strict.equal(parsed[key].value.url, subMap.handle.absolutePath); | ||
} | ||
@@ -115,3 +112,3 @@ }); | ||
// eslint-disable-next-line max-len | ||
assert_1.default.equal(serialized, `{"object":{"type":"Plain","value":{"subMapHandle":{"type":"__fluid_handle__","url":"${subMapHandleUrl}"},"nestedObj":{"subMap2Handle":{"type":"__fluid_handle__","url":"${subMap2HandleUrl}"}}}}}`); | ||
assert_1.strict.equal(serialized, `{"object":{"type":"Plain","value":{"subMapHandle":{"type":"__fluid_handle__","url":"${subMapHandleUrl}"},"nestedObj":{"subMap2Handle":{"type":"__fluid_handle__","url":"${subMap2HandleUrl}"}}}}}`); | ||
}); | ||
@@ -128,3 +125,3 @@ it("can load old serialization format", async () => { | ||
const loadedMap = await factory.load(dataStoreRuntime, "mapId", services, "branchId", factory.attributes); | ||
assert_1.default(loadedMap.get("key") === "value"); | ||
assert_1.strict(loadedMap.get("key") === "value"); | ||
}); | ||
@@ -134,3 +131,3 @@ it("new serialization format for small maps", async () => { | ||
const tree = map.snapshot(); | ||
assert_1.default(tree.entries.length === 1); | ||
assert_1.strict(tree.entries.length === 1); | ||
const content = JSON.stringify({ | ||
@@ -145,7 +142,7 @@ blobs: [], | ||
}); | ||
assert_1.default(tree.entries.length === 1); | ||
assert_1.default(tree.entries[0].value.contents === content); | ||
assert_1.strict(tree.entries.length === 1); | ||
assert_1.strict(tree.entries[0].value.contents === content); | ||
const services = new test_runtime_utils_1.MockSharedObjectServices({ header: content }); | ||
const loadedMap = await factory.load(dataStoreRuntime, "mapId", services, "branchId", factory.attributes); | ||
assert_1.default(loadedMap.get("key") === "value"); | ||
assert_1.strict(loadedMap.get("key") === "value"); | ||
}); | ||
@@ -162,3 +159,3 @@ it("new serialization format for big maps", async () => { | ||
const tree = map.snapshot(); | ||
assert_1.default(tree.entries.length === 2); | ||
assert_1.strict(tree.entries.length === 2); | ||
const content1 = JSON.stringify({ | ||
@@ -183,7 +180,7 @@ blobs: ["blob0"], | ||
}); | ||
assert_1.default(tree.entries.length === 2); | ||
assert_1.default(tree.entries[1].path === "header"); | ||
assert_1.default(tree.entries[1].value.contents === content1); | ||
assert_1.default(tree.entries[0].path === "blob0"); | ||
assert_1.default(tree.entries[0].value.contents === content2); | ||
assert_1.strict(tree.entries.length === 2); | ||
assert_1.strict(tree.entries[1].path === "header"); | ||
assert_1.strict(tree.entries[1].value.contents === content1); | ||
assert_1.strict(tree.entries[0].path === "blob0"); | ||
assert_1.strict(tree.entries[0].value.contents === content2); | ||
const services = new test_runtime_utils_1.MockSharedObjectServices({ | ||
@@ -194,5 +191,5 @@ header: content1, | ||
const loadedMap = await factory.load(dataStoreRuntime, "mapId", services, "branchId", factory.attributes); | ||
assert_1.default(loadedMap.get("key") === "value"); | ||
assert_1.default(loadedMap.get("longValue") === longString); | ||
assert_1.default(loadedMap.get("zzz") === "the end"); | ||
assert_1.strict(loadedMap.get("key") === "value"); | ||
assert_1.strict(loadedMap.get("longValue") === longString); | ||
assert_1.strict(loadedMap.get("zzz") === "the end"); | ||
}); | ||
@@ -237,4 +234,4 @@ }); | ||
// Verify that both the maps have the key. | ||
assert_1.default.equal(map.get(key), value, "The first map does not have the key"); | ||
assert_1.default.equal(map2.get(key), value, "The second map does not have the key"); | ||
assert_1.strict.equal(map.get(key), value, "The first map does not have the key"); | ||
assert_1.strict.equal(map2.get(key), value, "The second map does not have the key"); | ||
// Set a new value for the same key in the second SharedMap. | ||
@@ -246,4 +243,4 @@ const newValue = "newvalue"; | ||
// Verify that both the maps have the new value. | ||
assert_1.default.equal(map.get(key), newValue, "The first map did not get the new value"); | ||
assert_1.default.equal(map2.get(key), newValue, "The second map did not get the new value"); | ||
assert_1.strict.equal(map.get(key), newValue, "The first map did not get the new value"); | ||
assert_1.strict.equal(map2.get(key), newValue, "The second map did not get the new value"); | ||
}); | ||
@@ -279,5 +276,5 @@ }); | ||
// Verify the local SharedMap | ||
assert_1.default.equal(map.get("test"), value, "could not retrieve key"); | ||
assert_1.strict.equal(map.get("test"), value, "could not retrieve key"); | ||
// Verify the remote SharedMap | ||
assert_1.default.equal(map2.get("test"), value, "could not retrieve key from the remote map"); | ||
assert_1.strict.equal(map2.get("test"), value, "could not retrieve key from the remote map"); | ||
}); | ||
@@ -287,3 +284,3 @@ }); | ||
it("Should return false when a key is not in the map", () => { | ||
assert_1.default.equal(map.has("notInSet"), false, "has() did not return false for missing key"); | ||
assert_1.strict.equal(map.has("notInSet"), false, "has() did not return false for missing key"); | ||
}); | ||
@@ -294,5 +291,5 @@ it("Should return true when a key is in the map", () => { | ||
// Verify the local SharedMap | ||
assert_1.default.equal(map.has("inSet"), true, "could not find the key"); | ||
assert_1.strict.equal(map.has("inSet"), true, "could not find the key"); | ||
// Verify the remote SharedMap | ||
assert_1.default.equal(map2.has("inSet"), true, "could not find the key in the remote map"); | ||
assert_1.strict.equal(map2.has("inSet"), true, "could not find the key in the remote map"); | ||
}); | ||
@@ -306,7 +303,7 @@ }); | ||
// Verify the local SharedMap | ||
assert_1.default.equal(map.has("test"), true, "could not find the set key"); | ||
assert_1.default.equal(map.get("test"), value, "could not get the set key"); | ||
assert_1.strict.equal(map.has("test"), true, "could not find the set key"); | ||
assert_1.strict.equal(map.get("test"), value, "could not get the set key"); | ||
// Verify the remote SharedMap | ||
assert_1.default.equal(map2.has("test"), true, "could not find the set key in remote map"); | ||
assert_1.default.equal(map2.get("test"), value, "could note get the set key from remote map"); | ||
assert_1.strict.equal(map2.has("test"), true, "could not find the set key in remote map"); | ||
assert_1.strict.equal(map2.get("test"), value, "could note get the set key from remote map"); | ||
}); | ||
@@ -319,6 +316,6 @@ it("Should be able to set a shared object handle as a key", () => { | ||
const localSubMap = map.get("test"); | ||
assert_1.default.equal(localSubMap.absolutePath, subMap.handle.absolutePath, "could not get the handle's path"); | ||
assert_1.strict.equal(localSubMap.absolutePath, subMap.handle.absolutePath, "could not get the handle's path"); | ||
// Verify the remote SharedMap | ||
const remoteSubMap = map2.get("test"); | ||
assert_1.default.equal(remoteSubMap.absolutePath, subMap.handle.absolutePath, "could not get the handle's path in remote map"); | ||
assert_1.strict.equal(remoteSubMap.absolutePath, subMap.handle.absolutePath, "could not get the handle's path in remote map"); | ||
}); | ||
@@ -338,5 +335,5 @@ it("Should be able to set and retrieve a plain object with nested handles", async () => { | ||
const retrievedSubMap = await retrieved.subMapHandle.get(); | ||
assert_1.default.equal(retrievedSubMap, subMap, "could not get nested map 1"); | ||
assert_1.strict.equal(retrievedSubMap, subMap, "could not get nested map 1"); | ||
const retrievedSubMap2 = await retrieved.nestedObj.subMap2Handle.get(); | ||
assert_1.default.equal(retrievedSubMap2, subMap2, "could not get nested map 2"); | ||
assert_1.strict.equal(retrievedSubMap2, subMap2, "could not get nested map 2"); | ||
}); | ||
@@ -358,14 +355,14 @@ }); | ||
map.forEach((value, key) => { | ||
assert_1.default.ok(set.has(key), "the key should be present in the set"); | ||
assert_1.default.equal(key, value, "the value should match the set value"); | ||
assert_1.default.equal(map.get(key), value, "could not get key"); | ||
assert_1.strict.ok(set.has(key), "the key should be present in the set"); | ||
assert_1.strict.equal(key, value, "the value should match the set value"); | ||
assert_1.strict.equal(map.get(key), value, "could not get key"); | ||
}); | ||
// Verify the remote SharedMap | ||
map2.forEach((value, key) => { | ||
assert_1.default.ok(set.has(key), "the key in remote map should be present in the set"); | ||
assert_1.default.equal(key, value, "the value should match the set value in the remote map"); | ||
assert_1.default.equal(map2.get(key), value, "could not get key in the remote map"); | ||
assert_1.strict.ok(set.has(key), "the key in remote map should be present in the set"); | ||
assert_1.strict.equal(key, value, "the value should match the set value in the remote map"); | ||
assert_1.strict.equal(map2.get(key), value, "could not get key in the remote map"); | ||
set.delete(key); | ||
}); | ||
assert_1.default.equal(set.size, 0); | ||
assert_1.strict.equal(set.size, 0); | ||
}); | ||
@@ -376,11 +373,11 @@ }); | ||
map.set("test", "resolved"); | ||
assert_1.default.ok(map.has("test")); | ||
assert_1.strict.ok(map.has("test")); | ||
containerRuntimeFactory.processAllMessages(); | ||
// Verify the local SharedMap | ||
assert_1.default.equal(await map.wait("test"), "resolved", "promise not resolved for existing key"); | ||
assert_1.strict.equal(await map.wait("test"), "resolved", "promise not resolved for existing key"); | ||
// Verify the remote SharedMap | ||
assert_1.default.equal(await map2.wait("test"), "resolved", "promise not resolved for existing key in remote map"); | ||
assert_1.strict.equal(await map2.wait("test"), "resolved", "promise not resolved for existing key in remote map"); | ||
}); | ||
it("Should resolve returned promise once unavailable key is available", async () => { | ||
assert_1.default.ok(!map.has("test")); | ||
assert_1.strict.ok(!map.has("test")); | ||
const waitP = map.wait("test"); | ||
@@ -391,5 +388,5 @@ const waitP2 = map2.wait("test"); | ||
// Verify the local SharedMap | ||
assert_1.default.equal(await waitP, "resolved", "promise not resolved after key is available"); | ||
assert_1.strict.equal(await waitP, "resolved", "promise not resolved after key is available"); | ||
// Verify the remote SharedMap | ||
assert_1.default.equal(await waitP2, "resolved", "promise not resolved after key is available in remote map"); | ||
assert_1.strict.equal(await waitP2, "resolved", "promise not resolved after key is available in remote map"); | ||
}); | ||
@@ -396,0 +393,0 @@ }); |
@@ -6,7 +6,4 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = __importDefault(require("assert")); | ||
const assert_1 = require("assert"); | ||
const test_runtime_utils_1 = require("@fluidframework/test-runtime-utils"); | ||
@@ -54,4 +51,4 @@ const map_1 = require("../map"); | ||
// Verify that the set value is processed by both clients. | ||
assert_1.default.equal(map1.get(key), value, "The local client did not process the set"); | ||
assert_1.default.equal(map2.get(key), value, "The remote client did not process the set"); | ||
assert_1.strict.equal(map1.get(key), value, "The local client did not process the set"); | ||
assert_1.strict.equal(map2.get(key), value, "The remote client did not process the set"); | ||
// Delete the value from the second SharedMap. | ||
@@ -65,4 +62,4 @@ map2.delete(key); | ||
// Verify that the deleted value is processed by both clients. | ||
assert_1.default.equal(map1.get(key), undefined, "The local client did not process the delete"); | ||
assert_1.default.equal(map2.get(key), undefined, "The remote client did not process the delete"); | ||
assert_1.strict.equal(map1.get(key), undefined, "The local client did not process the delete"); | ||
assert_1.strict.equal(map2.get(key), undefined, "The remote client did not process the delete"); | ||
}); | ||
@@ -81,4 +78,4 @@ it("can store ops in disconnected state and resend them on reconnection", async () => { | ||
// Verify that the set value is processed by both clients. | ||
assert_1.default.equal(map1.get(key), value, "The local client did not process the set"); | ||
assert_1.default.equal(map2.get(key), value, "The remote client did not process the set"); | ||
assert_1.strict.equal(map1.get(key), value, "The local client did not process the set"); | ||
assert_1.strict.equal(map2.get(key), value, "The remote client did not process the set"); | ||
// Disconnect the second client. | ||
@@ -93,4 +90,4 @@ containerRuntime2.connected = false; | ||
// Verify that the deleted value is processed by both clients. | ||
assert_1.default.equal(map1.get(key), undefined, "The local client did not process the delete"); | ||
assert_1.default.equal(map2.get(key), undefined, "The remote client did not process the delete"); | ||
assert_1.strict.equal(map1.get(key), undefined, "The local client did not process the delete"); | ||
assert_1.strict.equal(map2.get(key), undefined, "The remote client did not process the delete"); | ||
}); | ||
@@ -142,10 +139,10 @@ }); | ||
// Verify that the ops are processed by both clients. | ||
assert_1.default.equal(directory1.get(key), value, "The local client did not process the set"); | ||
assert_1.default.equal(directory2.get(key), value, "The remote client did not process the set"); | ||
assert_1.strict.equal(directory1.get(key), value, "The local client did not process the set"); | ||
assert_1.strict.equal(directory2.get(key), value, "The remote client did not process the set"); | ||
const subDir1 = directory1.getSubDirectory(subDirName); | ||
assert_1.default.ok(subDir1); | ||
assert_1.default.equal(subDir1.get(subDirKey), subDirValue); | ||
assert_1.strict.ok(subDir1); | ||
assert_1.strict.equal(subDir1.get(subDirKey), subDirValue); | ||
const subDir2 = directory2.getSubDirectory(subDirName); | ||
assert_1.default.ok(subDir2); | ||
assert_1.default.equal(subDir2.get(subDirKey), subDirValue); | ||
assert_1.strict.ok(subDir2); | ||
assert_1.strict.equal(subDir2.get(subDirKey), subDirValue); | ||
// Delete the sub directory from the second SharedDirectory. | ||
@@ -159,4 +156,4 @@ directory2.deleteSubDirectory(subDirName); | ||
// Verify that the delete is processed by both clients. | ||
assert_1.default.equal(directory1.getSubDirectory(subDirName), undefined, "The local client did not delete sub directory"); | ||
assert_1.default.equal(directory2.getSubDirectory(subDirName), undefined, "The remote client did not delete sub directory"); | ||
assert_1.strict.equal(directory1.getSubDirectory(subDirName), undefined, "The local client did not delete sub directory"); | ||
assert_1.strict.equal(directory2.getSubDirectory(subDirName), undefined, "The remote client did not delete sub directory"); | ||
}); | ||
@@ -181,10 +178,10 @@ it("can store ops in disconnected state and resend them on reconnection", async () => { | ||
// Verify that the ops are processed by both clients. | ||
assert_1.default.equal(directory1.get(key), value, "The local client did not process the set"); | ||
assert_1.default.equal(directory2.get(key), value, "The remote client did not process the set"); | ||
assert_1.strict.equal(directory1.get(key), value, "The local client did not process the set"); | ||
assert_1.strict.equal(directory2.get(key), value, "The remote client did not process the set"); | ||
const subDir1 = directory1.getSubDirectory(subDirName); | ||
assert_1.default.ok(subDir1); | ||
assert_1.default.equal(subDir1.get(subDirKey), subDirValue); | ||
assert_1.strict.ok(subDir1); | ||
assert_1.strict.equal(subDir1.get(subDirKey), subDirValue); | ||
const subDir2 = directory2.getSubDirectory(subDirName); | ||
assert_1.default.ok(subDir2); | ||
assert_1.default.equal(subDir2.get(subDirKey), subDirValue); | ||
assert_1.strict.ok(subDir2); | ||
assert_1.strict.equal(subDir2.get(subDirKey), subDirValue); | ||
// Disconnect the second client. | ||
@@ -199,4 +196,4 @@ containerRuntime2.connected = false; | ||
// Verify that the delete is processed by both clients. | ||
assert_1.default.equal(directory1.getSubDirectory(subDirName), undefined, "The local client did not delete sub directory"); | ||
assert_1.default.equal(directory2.getSubDirectory(subDirName), undefined, "The remote client did not delete sub directory"); | ||
assert_1.strict.equal(directory1.getSubDirectory(subDirName), undefined, "The local client did not delete sub directory"); | ||
assert_1.strict.equal(directory2.getSubDirectory(subDirName), undefined, "The remote client did not delete sub directory"); | ||
}); | ||
@@ -203,0 +200,0 @@ }); |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import path from "path"; | ||
@@ -8,0 +8,0 @@ import { fromBase64ToUtf8 } from "@fluidframework/common-utils"; |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { makeHandlesSerializable, parseHandles, ValueType } from "@fluidframework/shared-object-base"; | ||
@@ -8,0 +8,0 @@ import { TypedEventEmitter } from "@fluidframework/common-utils"; |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/map"; | ||
export declare const pkgVersion = "0.26.0-3177"; | ||
export declare const pkgVersion = "0.26.0"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
export const pkgName = "@fluidframework/map"; | ||
export const pkgVersion = "0.26.0-3177"; | ||
export const pkgVersion = "0.26.0"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { TreeEntry, } from "@fluidframework/protocol-definitions"; | ||
@@ -8,0 +8,0 @@ import { MockFluidDataStoreRuntime, MockContainerRuntimeFactory, MockSharedObjectServices, MockStorage, } from "@fluidframework/test-runtime-utils"; |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { MockFluidDataStoreRuntime, MockContainerRuntimeFactory, MockSharedObjectServices, MockStorage, } from "@fluidframework/test-runtime-utils"; | ||
@@ -8,0 +8,0 @@ import { MapFactory, SharedMap } from "../map"; |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { MockFluidDataStoreRuntime, MockContainerRuntimeFactoryForReconnection, MockStorage, } from "@fluidframework/test-runtime-utils"; | ||
@@ -8,0 +8,0 @@ import { MapFactory, SharedMap } from "../map"; |
{ | ||
"name": "@fluidframework/map", | ||
"version": "0.26.0-3177", | ||
"version": "0.26.0", | ||
"description": "Distributed map", | ||
@@ -55,16 +55,16 @@ "homepage": "https://fluidframework.com", | ||
"dependencies": { | ||
"@fluidframework/common-definitions": "^0.19.1-0", | ||
"@fluidframework/common-utils": "^0.23.0-0", | ||
"@fluidframework/core-interfaces": "^0.26.0-3177", | ||
"@fluidframework/datastore-definitions": "^0.26.0-3177", | ||
"@fluidframework/protocol-base": "^0.1012.0-0", | ||
"@fluidframework/protocol-definitions": "^0.1012.0-0", | ||
"@fluidframework/shared-object-base": "^0.26.0-3177", | ||
"@fluidframework/common-definitions": "^0.19.1", | ||
"@fluidframework/common-utils": "^0.23.0", | ||
"@fluidframework/core-interfaces": "^0.26.0", | ||
"@fluidframework/datastore-definitions": "^0.26.0", | ||
"@fluidframework/protocol-base": "^0.1012.0", | ||
"@fluidframework/protocol-definitions": "^0.1012.0", | ||
"@fluidframework/shared-object-base": "^0.26.0", | ||
"debug": "^4.1.1" | ||
}, | ||
"devDependencies": { | ||
"@fluidframework/build-common": "^0.19.2-0", | ||
"@fluidframework/eslint-config-fluid": "^0.19.1-0", | ||
"@fluidframework/mocha-test-setup": "^0.26.0-3177", | ||
"@fluidframework/test-runtime-utils": "^0.26.0-3177", | ||
"@fluidframework/build-common": "^0.19.2", | ||
"@fluidframework/eslint-config-fluid": "^0.19.1", | ||
"@fluidframework/mocha-test-setup": "^0.26.0", | ||
"@fluidframework/test-runtime-utils": "^0.26.0", | ||
"@microsoft/api-extractor": "^7.7.2", | ||
@@ -71,0 +71,0 @@ "@types/debug": "^4.1.5", |
@@ -6,3 +6,3 @@ /*! | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import path from "path"; | ||
@@ -9,0 +9,0 @@ import { fromBase64ToUtf8 } from "@fluidframework/common-utils"; |
@@ -6,3 +6,3 @@ /*! | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { IFluidHandle } from "@fluidframework/core-interfaces"; | ||
@@ -9,0 +9,0 @@ import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions"; |
@@ -9,2 +9,2 @@ /*! | ||
export const pkgName = "@fluidframework/map"; | ||
export const pkgVersion = "0.26.0-3177"; | ||
export const pkgVersion = "0.26.0"; |
@@ -6,3 +6,3 @@ /*! | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { | ||
@@ -9,0 +9,0 @@ IBlob, |
@@ -6,3 +6,3 @@ /*! | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { IFluidHandle } from "@fluidframework/core-interfaces"; | ||
@@ -9,0 +9,0 @@ import { IBlob } from "@fluidframework/protocol-definitions"; |
@@ -6,3 +6,3 @@ /*! | ||
import assert from "assert"; | ||
import { strict as assert } from "assert"; | ||
import { | ||
@@ -9,0 +9,0 @@ MockFluidDataStoreRuntime, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1356274
15051