mol_plot_all 1.2.141 → 1.2.145

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/web.test.js CHANGED
@@ -956,6 +956,61 @@ var $;
956
956
  ;
957
957
  "use strict";
958
958
  var $;
959
+ (function ($) {
960
+ $.$mol_test({
961
+ 'Primitives'() {
962
+ $.$mol_assert_equal($.$mol_key(null), 'null');
963
+ $.$mol_assert_equal($.$mol_key(false), 'false');
964
+ $.$mol_assert_equal($.$mol_key(true), 'true');
965
+ $.$mol_assert_equal($.$mol_key(0), '0');
966
+ $.$mol_assert_equal($.$mol_key(''), '""');
967
+ },
968
+ 'Array & POJO'() {
969
+ $.$mol_assert_equal($.$mol_key([null]), '[null]');
970
+ $.$mol_assert_equal($.$mol_key({ foo: 0 }), '{"foo":0}');
971
+ $.$mol_assert_equal($.$mol_key({ foo: [false] }), '{"foo":[false]}');
972
+ },
973
+ 'Function'() {
974
+ const func = () => { };
975
+ $.$mol_assert_equal($.$mol_key(func), $.$mol_key(func));
976
+ $.$mol_assert_unique($.$mol_key(func), $.$mol_key(() => { }));
977
+ },
978
+ 'Objects'() {
979
+ class User {
980
+ }
981
+ const jin = new User();
982
+ $.$mol_assert_equal($.$mol_key(jin), $.$mol_key(jin));
983
+ $.$mol_assert_unique($.$mol_key(jin), $.$mol_key(new User()));
984
+ },
985
+ 'Elements'() {
986
+ const foo = $.$mol_jsx("div", null, "bar");
987
+ $.$mol_assert_equal($.$mol_key(foo), $.$mol_key(foo));
988
+ $.$mol_assert_unique($.$mol_key(foo), $.$mol_key($.$mol_jsx("div", null, "bar")));
989
+ },
990
+ 'Custom JSON representation'() {
991
+ class User {
992
+ name;
993
+ age;
994
+ constructor(name, age) {
995
+ this.name = name;
996
+ this.age = age;
997
+ }
998
+ toJSON() { return { name: this.name }; }
999
+ }
1000
+ $.$mol_assert_equal($.$mol_key(new User('jin', 18)), '{"name":"jin"}');
1001
+ },
1002
+ 'Special native classes'() {
1003
+ $.$mol_assert_equal($.$mol_key(new Date('xyz')), 'null');
1004
+ $.$mol_assert_equal($.$mol_key(new Date('2001-01-02T03:04:05.678Z')), '"2001-01-02T03:04:05.678Z"');
1005
+ $.$mol_assert_equal($.$mol_key(/./), '"/./"');
1006
+ $.$mol_assert_equal($.$mol_key(/\./gimsu), '"/\\\\./gimsu"');
1007
+ },
1008
+ });
1009
+ })($ || ($ = {}));
1010
+ //key.test.js.map
1011
+ ;
1012
+ "use strict";
1013
+ var $;
959
1014
  (function ($_1) {
960
1015
  $_1.$mol_test({
961
1016
  'keyed reactive properties'($) {