-
Notifications
You must be signed in to change notification settings - Fork 4
/
error_messages_test.ts
30 lines (28 loc) · 1.03 KB
/
error_messages_test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2018-2022 Gamebridge.ai authors. All rights reserved. MIT license.
import { assert, assertEquals, test } from "./test_deps.ts";
import * as mod from "./error_messages.ts";
test({
name: "Error messages assertions",
fn() {
assert(mod != null);
assertEquals(typeof mod.ERROR_DUPLICATE_PROPERTY_KEY, "string");
assertEquals(typeof mod.ERROR_DUPLICATE_SERIALIZE_KEY, "string");
assertEquals(typeof mod.ERROR_MISSING_PROPERTIES_MAP, "string");
assertEquals(typeof mod.ERROR_SYMBOL_PROPERTY_NAME, "string");
assertEquals(
typeof mod.ERROR_FAILED_TO_RESOLVE_POLYMORPHIC_CLASS,
"string",
);
assertEquals(typeof mod.ERROR_INVALID_DATE, "string");
assertEquals(typeof mod.ERROR_TO_OBJECT_CONTAINING_INVALID_VALUE, "string");
assertEquals(
typeof mod.ERROR_TO_OBJECT_CONTAINING_INVALID_SUB_VALUE,
"string",
);
assertEquals(
typeof mod.ERROR_GET_NEW_SERIALIZABLE_SERIALIZABLE_NOT_RETURNED,
"string",
);
assertEquals(Object.keys(mod).length, 9);
},
});