@fluidframework/test-runtime-utils 2.71.0 → 2.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -11,5 +11,5 @@ export { MockHandle } from "./mockHandle.js";
11
11
  export { IMockContainerRuntimePendingMessage, MockContainerRuntime, IMockContainerRuntimeOptions, MockContainerRuntimeFactory, MockDeltaConnection, MockEmptyDeltaConnection, MockFluidDataStoreRuntime, MockObjectStorageService, MockQuorumClients, MockAudience, MockSharedObjectServices, IInternalMockRuntimeMessage, } from "./mocks.js";
12
12
  export { MockContainerRuntimeFactoryForReconnection, MockContainerRuntimeForReconnection, } from "./mocksForReconnection.js";
13
13
  export { MockStorage } from "./mockStorage.js";
14
- export { validateAssertionError } from "./validateAssertionError.js";
14
+ export { validateAssertionError, validateUsageError, validateTypeError, validateError, } from "./validateAssertionError.js";
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACN,mCAAmC,EACnC,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,2BAA2B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,0CAA0C,EAC1C,mCAAmC,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACN,mCAAmC,EACnC,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,2BAA2B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,0CAA0C,EAC1C,mCAAmC,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACN,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACb,MAAM,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.validateAssertionError = exports.MockStorage = exports.MockContainerRuntimeForReconnection = exports.MockContainerRuntimeFactoryForReconnection = exports.MockSharedObjectServices = exports.MockAudience = exports.MockQuorumClients = exports.MockObjectStorageService = exports.MockFluidDataStoreRuntime = exports.MockEmptyDeltaConnection = exports.MockDeltaConnection = exports.MockContainerRuntimeFactory = exports.MockContainerRuntime = exports.MockHandle = exports.MockDeltaQueue = exports.MockDeltaManager = exports.MockFluidDataStoreContext = exports.InsecureTokenProvider = exports.deepFreeze = void 0;
7
+ exports.validateError = exports.validateTypeError = exports.validateUsageError = exports.validateAssertionError = exports.MockStorage = exports.MockContainerRuntimeForReconnection = exports.MockContainerRuntimeFactoryForReconnection = exports.MockSharedObjectServices = exports.MockAudience = exports.MockQuorumClients = exports.MockObjectStorageService = exports.MockFluidDataStoreRuntime = exports.MockEmptyDeltaConnection = exports.MockDeltaConnection = exports.MockContainerRuntimeFactory = exports.MockContainerRuntime = exports.MockHandle = exports.MockDeltaQueue = exports.MockDeltaManager = exports.MockFluidDataStoreContext = exports.InsecureTokenProvider = exports.deepFreeze = void 0;
8
8
  var deepFreeze_js_1 = require("./deepFreeze.js");
9
9
  Object.defineProperty(exports, "deepFreeze", { enumerable: true, get: function () { return deepFreeze_js_1.deepFreeze; } });
10
10
  var insecureTokenProvider_js_1 = require("./insecureTokenProvider.js");
@@ -33,4 +33,7 @@ var mockStorage_js_1 = require("./mockStorage.js");
33
33
  Object.defineProperty(exports, "MockStorage", { enumerable: true, get: function () { return mockStorage_js_1.MockStorage; } });
34
34
  var validateAssertionError_js_1 = require("./validateAssertionError.js");
35
35
  Object.defineProperty(exports, "validateAssertionError", { enumerable: true, get: function () { return validateAssertionError_js_1.validateAssertionError; } });
36
+ Object.defineProperty(exports, "validateUsageError", { enumerable: true, get: function () { return validateAssertionError_js_1.validateUsageError; } });
37
+ Object.defineProperty(exports, "validateTypeError", { enumerable: true, get: function () { return validateAssertionError_js_1.validateTypeError; } });
38
+ Object.defineProperty(exports, "validateError", { enumerable: true, get: function () { return validateAssertionError_js_1.validateError; } });
36
39
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AAEnB,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAClC,iDAAmE;AAA1D,iHAAA,gBAAgB,OAAA;AAAE,+GAAA,cAAc,OAAA;AACzC,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,uCAaoB;AAXnB,gHAAA,oBAAoB,OAAA;AAEpB,uHAAA,2BAA2B,OAAA;AAC3B,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,oHAAA,wBAAwB,OAAA;AACxB,6GAAA,iBAAiB,OAAA;AACjB,wGAAA,YAAY,OAAA;AACZ,oHAAA,wBAAwB,OAAA;AAGzB,qEAGmC;AAFlC,qJAAA,0CAA0C,OAAA;AAC1C,8IAAA,mCAAmC,OAAA;AAEpC,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { deepFreeze } from \"./deepFreeze.js\";\nexport { IInsecureUser } from \"./insecureUsers.js\";\nexport { InsecureTokenProvider } from \"./insecureTokenProvider.js\";\nexport { MockFluidDataStoreContext } from \"./mocksDataStoreContext.js\";\nexport { MockDeltaManager, MockDeltaQueue } from \"./mockDeltas.js\";\nexport { MockHandle } from \"./mockHandle.js\";\nexport {\n\tIMockContainerRuntimePendingMessage,\n\tMockContainerRuntime,\n\tIMockContainerRuntimeOptions,\n\tMockContainerRuntimeFactory,\n\tMockDeltaConnection,\n\tMockEmptyDeltaConnection,\n\tMockFluidDataStoreRuntime,\n\tMockObjectStorageService,\n\tMockQuorumClients,\n\tMockAudience,\n\tMockSharedObjectServices,\n\tIInternalMockRuntimeMessage,\n} from \"./mocks.js\";\nexport {\n\tMockContainerRuntimeFactoryForReconnection,\n\tMockContainerRuntimeForReconnection,\n} from \"./mocksForReconnection.js\";\nexport { MockStorage } from \"./mockStorage.js\";\nexport { validateAssertionError } from \"./validateAssertionError.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AAEnB,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAClC,iDAAmE;AAA1D,iHAAA,gBAAgB,OAAA;AAAE,+GAAA,cAAc,OAAA;AACzC,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,uCAaoB;AAXnB,gHAAA,oBAAoB,OAAA;AAEpB,uHAAA,2BAA2B,OAAA;AAC3B,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,qHAAA,yBAAyB,OAAA;AACzB,oHAAA,wBAAwB,OAAA;AACxB,6GAAA,iBAAiB,OAAA;AACjB,wGAAA,YAAY,OAAA;AACZ,oHAAA,wBAAwB,OAAA;AAGzB,qEAGmC;AAFlC,qJAAA,0CAA0C,OAAA;AAC1C,8IAAA,mCAAmC,OAAA;AAEpC,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,yEAKqC;AAJpC,mIAAA,sBAAsB,OAAA;AACtB,+HAAA,kBAAkB,OAAA;AAClB,8HAAA,iBAAiB,OAAA;AACjB,0HAAA,aAAa,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { deepFreeze } from \"./deepFreeze.js\";\nexport { IInsecureUser } from \"./insecureUsers.js\";\nexport { InsecureTokenProvider } from \"./insecureTokenProvider.js\";\nexport { MockFluidDataStoreContext } from \"./mocksDataStoreContext.js\";\nexport { MockDeltaManager, MockDeltaQueue } from \"./mockDeltas.js\";\nexport { MockHandle } from \"./mockHandle.js\";\nexport {\n\tIMockContainerRuntimePendingMessage,\n\tMockContainerRuntime,\n\tIMockContainerRuntimeOptions,\n\tMockContainerRuntimeFactory,\n\tMockDeltaConnection,\n\tMockEmptyDeltaConnection,\n\tMockFluidDataStoreRuntime,\n\tMockObjectStorageService,\n\tMockQuorumClients,\n\tMockAudience,\n\tMockSharedObjectServices,\n\tIInternalMockRuntimeMessage,\n} from \"./mocks.js\";\nexport {\n\tMockContainerRuntimeFactoryForReconnection,\n\tMockContainerRuntimeForReconnection,\n} from \"./mocksForReconnection.js\";\nexport { MockStorage } from \"./mockStorage.js\";\nexport {\n\tvalidateAssertionError,\n\tvalidateUsageError,\n\tvalidateTypeError,\n\tvalidateError,\n} from \"./validateAssertionError.js\";\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * Validates that an error thrown by our assert() function has the expected message, or a
6
+ * Validates that an error thrown by our `assert()` function has the expected message, or a
7
7
  * short code that corresponds to that message.
8
8
  *
9
9
  * @remarks
@@ -12,13 +12,29 @@
12
12
  * before the policy-check tool replaces those strings with short codes, or after. Note that
13
13
  * it either returns true or throws an error (the behavior expected by NodeJS' `assert.throws()`).
14
14
  *
15
- * @param error - The error object thrown by our `assert()` function. Its `message` property could
16
- * be a short code, or the original string message coded into the `assert()`.
17
15
  * @param expectedErrorMessage - The message that the error object should match (either explicitly,
18
16
  * or because it contains a short code which maps to that message).
19
- * @returns `true` if the message in the error object that was passed in matches the expected
20
- * message. Otherwise it throws an error.
17
+ * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.
21
18
  * @internal
22
19
  */
23
- export declare function validateAssertionError(error: Error, expectedErrorMsg: string | RegExp): boolean;
20
+ export declare function validateAssertionError(expectedErrorMsg: string | RegExp): (error: Error) => true;
21
+ /**
22
+ * {@link validateError} for `UsageError`.
23
+ * @internal
24
+ */
25
+ export declare function validateUsageError(expectedErrorMsg: string | RegExp): (error: Error) => true;
26
+ /**
27
+ * {@link validateError} for `TypeError`.
28
+ * @internal
29
+ */
30
+ export declare function validateTypeError(expectedErrorMsg: string | RegExp): (error: Error) => true;
31
+ /**
32
+ * Validates that a specific kind of error was thrown with the expected message.
33
+ * @remarks
34
+ * Intended for use with NodeJS's `assert.throws`.
35
+ * @see {@link validateAssertionError}, {@link validateUsageError}, {@link validateTypeError} for more specialized versions.
36
+ * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.
37
+ * @internal
38
+ */
39
+ export declare function validateError(expectedErrorMsg: string | RegExp, errorType?: new (...args: any[]) => Error): (error: Error) => true;
24
40
  //# sourceMappingURL=validateAssertionError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validateAssertionError.d.ts","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAC/B,OAAO,CAqBT"}
1
+ {"version":3,"file":"validateAssertionError.d.ts","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACrC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAC/B,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAmBxB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAE5F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAE3F;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC5B,gBAAgB,EAAE,MAAM,GAAG,MAAM,EACjC,SAAS,GAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAa,GAC9C,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAaxB"}
@@ -4,10 +4,12 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.validateAssertionError = void 0;
7
+ exports.validateError = exports.validateTypeError = exports.validateUsageError = exports.validateAssertionError = void 0;
8
+ const internal_1 = require("@fluidframework/telemetry-utils/internal");
9
+ const internal_2 = require("@fluidframework/core-utils/internal");
8
10
  const assertionShortCodesMap_js_1 = require("./assertionShortCodesMap.js");
9
11
  /**
10
- * Validates that an error thrown by our assert() function has the expected message, or a
12
+ * Validates that an error thrown by our `assert()` function has the expected message, or a
11
13
  * short code that corresponds to that message.
12
14
  *
13
15
  * @remarks
@@ -16,32 +18,68 @@ const assertionShortCodesMap_js_1 = require("./assertionShortCodesMap.js");
16
18
  * before the policy-check tool replaces those strings with short codes, or after. Note that
17
19
  * it either returns true or throws an error (the behavior expected by NodeJS' `assert.throws()`).
18
20
  *
19
- * @param error - The error object thrown by our `assert()` function. Its `message` property could
20
- * be a short code, or the original string message coded into the `assert()`.
21
21
  * @param expectedErrorMessage - The message that the error object should match (either explicitly,
22
22
  * or because it contains a short code which maps to that message).
23
- * @returns `true` if the message in the error object that was passed in matches the expected
24
- * message. Otherwise it throws an error.
23
+ * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.
25
24
  * @internal
26
25
  */
27
- function validateAssertionError(error, expectedErrorMsg) {
28
- // Asserts with custom debugMessageBuilder put extra content on the second line of the message, even when tagged.
29
- // Thus extract the first line, which will be the assert tag if there is one, and replace it with the message from the shortCodeMap.
30
- const split = error.message.split("\n");
31
- const possibleShortCode = split[0].trim();
32
- if (possibleShortCode in assertionShortCodesMap_js_1.shortCodeMap) {
33
- split[0] = assertionShortCodesMap_js_1.shortCodeMap[possibleShortCode];
34
- }
35
- const mappedMsg = split.join("\n");
36
- if (typeof expectedErrorMsg === "string"
37
- ? mappedMsg !== expectedErrorMsg
38
- : !expectedErrorMsg.test(mappedMsg)) {
39
- // This throws an Error instead of an AssertionError because AssertionError would require a dependency on the
40
- // node assert library, which we don't want to do for this library because it's used in the browser.
41
- const message = `Unexpected assertion thrown\nActual: ${error.message === mappedMsg ? error.message : `${error.message} ('${mappedMsg}')}`}\nExpected: ${expectedErrorMsg}`;
42
- throw new Error(message);
43
- }
44
- return true;
26
+ function validateAssertionError(expectedErrorMsg) {
27
+ return (error) => {
28
+ // Asserts with custom debugMessageBuilder put extra content on the second line of the message, even when tagged.
29
+ // Thus extract the first line, which will be the assert tag if there is one, and replace it with the message from the shortCodeMap.
30
+ const split = error.message.split("\n");
31
+ const possibleShortCode = split[0].trim();
32
+ if (possibleShortCode in assertionShortCodesMap_js_1.shortCodeMap) {
33
+ split[0] = assertionShortCodesMap_js_1.shortCodeMap[possibleShortCode];
34
+ }
35
+ const mappedMsg = split.join("\n");
36
+ if (testErrorMessage(mappedMsg, expectedErrorMsg)) {
37
+ // This throws an Error instead of an AssertionError because AssertionError would require a dependency on the
38
+ // node assert library, which we don't want to do for this library because it's used in the browser.
39
+ const message = `Unexpected assertion thrown\nActual: ${error.message === mappedMsg ? error.message : `${error.message} ('${mappedMsg}')}`}\nExpected: ${expectedErrorMsg}`;
40
+ throw new Error(message);
41
+ }
42
+ return true;
43
+ };
45
44
  }
46
45
  exports.validateAssertionError = validateAssertionError;
46
+ /**
47
+ * {@link validateError} for `UsageError`.
48
+ * @internal
49
+ */
50
+ function validateUsageError(expectedErrorMsg) {
51
+ return validateError(expectedErrorMsg, internal_1.UsageError);
52
+ }
53
+ exports.validateUsageError = validateUsageError;
54
+ /**
55
+ * {@link validateError} for `TypeError`.
56
+ * @internal
57
+ */
58
+ function validateTypeError(expectedErrorMsg) {
59
+ return validateError(expectedErrorMsg, TypeError);
60
+ }
61
+ exports.validateTypeError = validateTypeError;
62
+ /**
63
+ * Validates that a specific kind of error was thrown with the expected message.
64
+ * @remarks
65
+ * Intended for use with NodeJS's `assert.throws`.
66
+ * @see {@link validateAssertionError}, {@link validateUsageError}, {@link validateTypeError} for more specialized versions.
67
+ * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.
68
+ * @internal
69
+ */
70
+ function validateError(expectedErrorMsg, errorType = Error) {
71
+ return (error) => {
72
+ (0, internal_2.assert)(error instanceof errorType, `Expected an error of type "${errorType.name}", but got "${error}"`);
73
+ if (testErrorMessage(error.message, expectedErrorMsg)) {
74
+ throw new Error(`Unexpected ${errorType.name} thrown\nActual: ${error.message}\nExpected: ${expectedErrorMsg}`);
75
+ }
76
+ return true;
77
+ };
78
+ }
79
+ exports.validateError = validateError;
80
+ function testErrorMessage(actualMessage, expectedErrorMsg) {
81
+ return typeof expectedErrorMsg === "string"
82
+ ? actualMessage !== expectedErrorMsg
83
+ : !expectedErrorMsg.test(actualMessage);
84
+ }
47
85
  //# sourceMappingURL=validateAssertionError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validateAssertionError.js","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2EAA2D;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,sBAAsB,CACrC,KAAY,EACZ,gBAAiC;IAEjC,iHAAiH;IACjH,oIAAoI;IACpI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1C,IAAI,iBAAiB,IAAI,wCAAY,EAAE,CAAC;QACvC,KAAK,CAAC,CAAC,CAAC,GAAG,wCAAY,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC;IACD,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEnC,IACC,OAAO,gBAAgB,KAAK,QAAQ;QACnC,CAAC,CAAC,SAAS,KAAK,gBAAgB;QAChC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,EACnC,CAAC;QACF,6GAA6G;QAC7G,oGAAoG;QACpG,MAAM,OAAO,GAAG,wCAAwC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,MAAM,SAAS,KAAK,eAAe,gBAAgB,EAAE,CAAC;QAC5K,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAxBD,wDAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { shortCodeMap } from \"./assertionShortCodesMap.js\";\n\n/**\n * Validates that an error thrown by our assert() function has the expected message, or a\n * short code that corresponds to that message.\n *\n * @remarks\n * The main use case for this is so tests that expect specific assert() calls to fail can\n * always do comparisons based on the original string message, and work whether they run\n * before the policy-check tool replaces those strings with short codes, or after. Note that\n * it either returns true or throws an error (the behavior expected by NodeJS' `assert.throws()`).\n *\n * @param error - The error object thrown by our `assert()` function. Its `message` property could\n * be a short code, or the original string message coded into the `assert()`.\n * @param expectedErrorMessage - The message that the error object should match (either explicitly,\n * or because it contains a short code which maps to that message).\n * @returns `true` if the message in the error object that was passed in matches the expected\n * message. Otherwise it throws an error.\n * @internal\n */\nexport function validateAssertionError(\n\terror: Error,\n\texpectedErrorMsg: string | RegExp,\n): boolean {\n\t// Asserts with custom debugMessageBuilder put extra content on the second line of the message, even when tagged.\n\t// Thus extract the first line, which will be the assert tag if there is one, and replace it with the message from the shortCodeMap.\n\tconst split = error.message.split(\"\\n\");\n\tconst possibleShortCode = split[0].trim();\n\tif (possibleShortCode in shortCodeMap) {\n\t\tsplit[0] = shortCodeMap[possibleShortCode];\n\t}\n\tconst mappedMsg = split.join(\"\\n\");\n\n\tif (\n\t\ttypeof expectedErrorMsg === \"string\"\n\t\t\t? mappedMsg !== expectedErrorMsg\n\t\t\t: !expectedErrorMsg.test(mappedMsg)\n\t) {\n\t\t// This throws an Error instead of an AssertionError because AssertionError would require a dependency on the\n\t\t// node assert library, which we don't want to do for this library because it's used in the browser.\n\t\tconst message = `Unexpected assertion thrown\\nActual: ${error.message === mappedMsg ? error.message : `${error.message} ('${mappedMsg}')}`}\\nExpected: ${expectedErrorMsg}`;\n\t\tthrow new Error(message);\n\t}\n\treturn true;\n}\n"]}
1
+ {"version":3,"file":"validateAssertionError.js","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AACtE,kEAA6D;AAC7D,2EAA2D;AAE3D;;;;;;;;;;;;;;GAcG;AACH,SAAgB,sBAAsB,CACrC,gBAAiC;IAEjC,OAAO,CAAC,KAAY,EAAE,EAAE;QACvB,iHAAiH;QACjH,oIAAoI;QACpI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,iBAAiB,IAAI,wCAAY,EAAE,CAAC;YACvC,KAAK,CAAC,CAAC,CAAC,GAAG,wCAAY,CAAC,iBAAiB,CAAC,CAAC;QAC5C,CAAC;QACD,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnC,IAAI,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,CAAC;YACnD,6GAA6G;YAC7G,oGAAoG;YACpG,MAAM,OAAO,GAAG,wCAAwC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,MAAM,SAAS,KAAK,eAAe,gBAAgB,EAAE,CAAC;YAC5K,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;AACH,CAAC;AArBD,wDAqBC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,gBAAiC;IACnE,OAAO,aAAa,CAAC,gBAAgB,EAAE,qBAAU,CAAC,CAAC;AACpD,CAAC;AAFD,gDAEC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,gBAAiC;IAClE,OAAO,aAAa,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC;AAFD,8CAEC;AAED;;;;;;;GAOG;AACH,SAAgB,aAAa,CAC5B,gBAAiC,EACjC,YAA2C,KAAK;IAEhD,OAAO,CAAC,KAAY,EAAE,EAAE;QACvB,IAAA,iBAAM,EACL,KAAK,YAAY,SAAS,EAC1B,8BAA8B,SAAS,CAAC,IAAI,eAAe,KAAK,GAAG,CACnE,CAAC;QACF,IAAI,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACd,cAAc,SAAS,CAAC,IAAI,oBAAoB,KAAK,CAAC,OAAO,eAAe,gBAAgB,EAAE,CAC9F,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;AACH,CAAC;AAhBD,sCAgBC;AAED,SAAS,gBAAgB,CAAC,aAAqB,EAAE,gBAAiC;IACjF,OAAO,OAAO,gBAAgB,KAAK,QAAQ;QAC1C,CAAC,CAAC,aAAa,KAAK,gBAAgB;QACpC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { shortCodeMap } from \"./assertionShortCodesMap.js\";\n\n/**\n * Validates that an error thrown by our `assert()` function has the expected message, or a\n * short code that corresponds to that message.\n *\n * @remarks\n * The main use case for this is so tests that expect specific assert() calls to fail can\n * always do comparisons based on the original string message, and work whether they run\n * before the policy-check tool replaces those strings with short codes, or after. Note that\n * it either returns true or throws an error (the behavior expected by NodeJS' `assert.throws()`).\n *\n * @param expectedErrorMessage - The message that the error object should match (either explicitly,\n * or because it contains a short code which maps to that message).\n * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.\n * @internal\n */\nexport function validateAssertionError(\n\texpectedErrorMsg: string | RegExp,\n): (error: Error) => true {\n\treturn (error: Error) => {\n\t\t// Asserts with custom debugMessageBuilder put extra content on the second line of the message, even when tagged.\n\t\t// Thus extract the first line, which will be the assert tag if there is one, and replace it with the message from the shortCodeMap.\n\t\tconst split = error.message.split(\"\\n\");\n\t\tconst possibleShortCode = split[0].trim();\n\t\tif (possibleShortCode in shortCodeMap) {\n\t\t\tsplit[0] = shortCodeMap[possibleShortCode];\n\t\t}\n\t\tconst mappedMsg = split.join(\"\\n\");\n\n\t\tif (testErrorMessage(mappedMsg, expectedErrorMsg)) {\n\t\t\t// This throws an Error instead of an AssertionError because AssertionError would require a dependency on the\n\t\t\t// node assert library, which we don't want to do for this library because it's used in the browser.\n\t\t\tconst message = `Unexpected assertion thrown\\nActual: ${error.message === mappedMsg ? error.message : `${error.message} ('${mappedMsg}')}`}\\nExpected: ${expectedErrorMsg}`;\n\t\t\tthrow new Error(message);\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * {@link validateError} for `UsageError`.\n * @internal\n */\nexport function validateUsageError(expectedErrorMsg: string | RegExp): (error: Error) => true {\n\treturn validateError(expectedErrorMsg, UsageError);\n}\n\n/**\n * {@link validateError} for `TypeError`.\n * @internal\n */\nexport function validateTypeError(expectedErrorMsg: string | RegExp): (error: Error) => true {\n\treturn validateError(expectedErrorMsg, TypeError);\n}\n\n/**\n * Validates that a specific kind of error was thrown with the expected message.\n * @remarks\n * Intended for use with NodeJS's `assert.throws`.\n * @see {@link validateAssertionError}, {@link validateUsageError}, {@link validateTypeError} for more specialized versions.\n * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.\n * @internal\n */\nexport function validateError(\n\texpectedErrorMsg: string | RegExp,\n\terrorType: new (...args: any[]) => Error = Error,\n): (error: Error) => true {\n\treturn (error: Error) => {\n\t\tassert(\n\t\t\terror instanceof errorType,\n\t\t\t`Expected an error of type \"${errorType.name}\", but got \"${error}\"`,\n\t\t);\n\t\tif (testErrorMessage(error.message, expectedErrorMsg)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unexpected ${errorType.name} thrown\\nActual: ${error.message}\\nExpected: ${expectedErrorMsg}`,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t};\n}\n\nfunction testErrorMessage(actualMessage: string, expectedErrorMsg: string | RegExp): boolean {\n\treturn typeof expectedErrorMsg === \"string\"\n\t\t? actualMessage !== expectedErrorMsg\n\t\t: !expectedErrorMsg.test(actualMessage);\n}\n"]}
@@ -1009,7 +1009,6 @@ export declare const shortCodeMap: {
1009
1009
  "0x7a9": string;
1010
1010
  "0x7aa": string;
1011
1011
  "0x7af": string;
1012
- "0x7b5": string;
1013
1012
  "0x7b6": string;
1014
1013
  "0x7b7": string;
1015
1014
  "0x7b8": string;
@@ -1154,16 +1153,6 @@ export declare const shortCodeMap: {
1154
1153
  "0x8cd": string;
1155
1154
  "0x8ce": string;
1156
1155
  "0x8cf": string;
1157
- "0x8d0": string;
1158
- "0x8d1": string;
1159
- "0x8d2": string;
1160
- "0x8d3": string;
1161
- "0x8d4": string;
1162
- "0x8d5": string;
1163
- "0x8d6": string;
1164
- "0x8d7": string;
1165
- "0x8d8": string;
1166
- "0x8d9": string;
1167
1156
  "0x8da": string;
1168
1157
  "0x8db": string;
1169
1158
  "0x8dc": string;
@@ -1198,7 +1187,6 @@ export declare const shortCodeMap: {
1198
1187
  "0x907": string;
1199
1188
  "0x908": string;
1200
1189
  "0x909": string;
1201
- "0x90e": string;
1202
1190
  "0x911": string;
1203
1191
  "0x916": string;
1204
1192
  "0x921": string;
@@ -1244,7 +1232,6 @@ export declare const shortCodeMap: {
1244
1232
  "0x962": string;
1245
1233
  "0x963": string;
1246
1234
  "0x964": string;
1247
- "0x965": string;
1248
1235
  "0x966": string;
1249
1236
  "0x967": string;
1250
1237
  "0x969": string;
@@ -1348,7 +1335,6 @@ export declare const shortCodeMap: {
1348
1335
  "0x9f4": string;
1349
1336
  "0x9f5": string;
1350
1337
  "0x9f6": string;
1351
- "0x9f7": string;
1352
1338
  "0x9f8": string;
1353
1339
  "0x9f9": string;
1354
1340
  "0x9fe": string;
@@ -1595,7 +1581,6 @@ export declare const shortCodeMap: {
1595
1581
  "0xb28": string;
1596
1582
  "0xb29": string;
1597
1583
  "0xb2a": string;
1598
- "0xb2b": string;
1599
1584
  "0xb2c": string;
1600
1585
  "0xb2d": string;
1601
1586
  "0xb2e": string;
@@ -1788,7 +1773,6 @@ export declare const shortCodeMap: {
1788
1773
  "0xc15": string;
1789
1774
  "0xc16": string;
1790
1775
  "0xc17": string;
1791
- "0xc19": string;
1792
1776
  "0xc1a": string;
1793
1777
  "0xc1b": string;
1794
1778
  "0xc1e": string;
@@ -1909,5 +1893,12 @@ export declare const shortCodeMap: {
1909
1893
  "0xc9a": string;
1910
1894
  "0xc9b": string;
1911
1895
  "0xc9c": string;
1896
+ "0xc9d": string;
1897
+ "0xc9e": string;
1898
+ "0xc9f": string;
1899
+ "0xca0": string;
1900
+ "0xca1": string;
1901
+ "0xca2": string;
1902
+ "0xca3": string;
1912
1903
  };
1913
1904
  //# sourceMappingURL=assertionShortCodesMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertionShortCodesMap.d.ts","sourceRoot":"","sources":["../src/assertionShortCodesMap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,YAAY;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAw2DxB,CAAC"}
@@ -1010,7 +1010,6 @@ export const shortCodeMap = {
1010
1010
  "0x7a9": "Collision during index update",
1011
1011
  "0x7aa": "Unknown removed node ID",
1012
1012
  "0x7af": "Destination must be a new empty detached field",
1013
- "0x7b5": "kind must be FieldKindWithEditor",
1014
1013
  "0x7b6": "Attach source field must be different from current field",
1015
1014
  "0x7b7": "Attach source field must exist",
1016
1015
  "0x7b8": "Attach must consume all nodes in source field",
@@ -1155,16 +1154,6 @@ export const shortCodeMap = {
1155
1154
  "0x8cd": "detached node should exist",
1156
1155
  "0x8ce": "Both replace replaces should not be undefined",
1157
1156
  "0x8cf": "Both replace replaces should not be undefined",
1158
- "0x8d0": "Multiple detached nodes",
1159
- "0x8d1": "Multiple attached nodes",
1160
- "0x8d2": "Invalid change: pin must have a reserved detach ID",
1161
- "0x8d3": "Invalid reserved detach ID",
1162
- "0x8d4": "Invalid change: unexpected reserved detach ID on a change that detaches a node from the field",
1163
- "0x8d5": "Invalid change: attach must have a reserved detach ID",
1164
- "0x8d6": "Invalid reserved detach ID",
1165
- "0x8d7": "Invalid change: unexpected reserved detach ID on a change that detaches a node from the field",
1166
- "0x8d8": "Invalid detach ID",
1167
- "0x8d9": "Invalid detach ID",
1168
1157
  "0x8da": "Unexpected node changeset collision",
1169
1158
  "0x8db": "Cannot peek length unless both mark queues are non-empty",
1170
1159
  "0x8dc": "Unexpected collision of new node changes",
@@ -1199,7 +1188,6 @@ export const shortCodeMap = {
1199
1188
  "0x907": "unknown op type",
1200
1189
  "0x908": "unknon type of op",
1201
1190
  "0x909": "should not be called",
1202
- "0x90e": "Unknown format version",
1203
1191
  "0x911": "Invalid operation on a disposed TreeCheckout",
1204
1192
  "0x916": "invalid value",
1205
1193
  "0x921": "Expected a leaf schema.",
@@ -1245,7 +1233,6 @@ export const shortCodeMap = {
1245
1233
  "0x962": "overwriting wrong cache",
1246
1234
  "0x963": "Invalid InternalTreeNode",
1247
1235
  "0x964": "A tagged change should only contain the tagged revision",
1248
- "0x965": "Implicit revision should be provided",
1249
1236
  "0x966": "Client id should be present and should be of type string",
1250
1237
  "0x967": "Received message from user not in the quorumClients",
1251
1238
  "0x969": "not connected yet",
@@ -1349,7 +1336,6 @@ export const shortCodeMap = {
1349
1336
  "0x9f4": "Impactful cell rename must target empty cell",
1350
1337
  "0x9f5": "Rename mark must have cell ID",
1351
1338
  "0x9f6": "Expected empty cell",
1352
- "0x9f7": "Rename must have idOverride",
1353
1339
  "0x9f8": "Rename must have idOverride",
1354
1340
  "0x9f9": "Renames should only target empty cells",
1355
1341
  "0x9fe": "node id should be an absolute route with child id part",
@@ -1596,7 +1582,6 @@ export const shortCodeMap = {
1596
1582
  "0xb28": "missing schema",
1597
1583
  "0xb29": "Expected defined output ID",
1598
1584
  "0xb2a": "Revision must be defined",
1599
- "0xb2b": "Mark type: NoopMarkType should not be encoded.",
1600
1585
  "0xb2c": "Mark type: NoopMarkType should not be encoded.",
1601
1586
  "0xb2d": "Unable to split mark due to lengths",
1602
1587
  "0xb2e": "missing schema for type in cursor",
@@ -1789,7 +1774,6 @@ export const shortCodeMap = {
1789
1774
  "0xc15": "Expected ObjectNodeStoredSchema",
1790
1775
  "0xc16": "missing schema for array node",
1791
1776
  "0xc17": "Expected MapNodeStoredSchema",
1792
- "0xc19": "Expected FieldSchemaAlpha",
1793
1777
  "0xc1a": "Expected MapNodeStoredSchema",
1794
1778
  "0xc1b": "Expected at least two types",
1795
1779
  "0xc1e": "Expected a constructed node to be an object",
@@ -1909,6 +1893,13 @@ export const shortCodeMap = {
1909
1893
  "0xc99": "Registered version is not less than the current version.",
1910
1894
  "0xc9a": "Presence capabilities should be empty.",
1911
1895
  "0xc9b": "Presence extension called without own compatibility details",
1912
- "0xc9c": "Data store context does not implement ContainerExtensionProvider"
1896
+ "0xc9c": "Data store context does not implement ContainerExtensionProvider",
1897
+ "0xc9d": "missing schema",
1898
+ "0xc9e": "Invalid configuration class constructed.",
1899
+ "0xc9f": "Unsupported FieldBatchFormatVersion for incremental chunks; must be v2 or higher",
1900
+ "0xca0": "Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher",
1901
+ "0xca1": "Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher",
1902
+ "0xca2": "localOpActivity must be undefined when entering rollback",
1903
+ "0xca3": "localOpActivity must be undefined when entering applyStashedOp"
1913
1904
  };
1914
1905
  //# sourceMappingURL=assertionShortCodesMap.js.map