How to use templateLiteral method in stryker-parent

Best JavaScript code snippet using stryker-parent

tagged-templates.ts

Source:tagged-templates.ts Github

copy

Full Screen

1import {parseScript} from "../../../src";2import {Program, Expression} from "../../../src/estree";3import * as assert from "clean-assert";4describe.skip("Expressions - Tagged Templates", () => {5 context("identifier tag", () => {6 test("tag", {7 type: "Identifier",8 name: "tag",9 });10 });11 context("call expression tag", () => {12 test("tag()", {13 type: "CallExpression",14 callee: {15 type: "Identifier",16 name: "tag",17 },18 arguments: [],19 });20 });21});22function test(src: string, node: Expression) {23 it("should parse escaped backslash", () => {24 assert.match<Program>(parseScript("(" + src + " `\\\\\\'`)"), {25 body: [26 {27 type: "ExpressionStatement",28 expression: {29 type: "TaggedTemplateExpression",30 tag: node,31 quasi: {32 type: "TemplateLiteral",33 expressions: [],34 quasis: [35 {36 type: "TemplateElement",37 value: {38 cooked: "\\'",39 raw: "\\\\\\'",40 },41 tail: true,42 },43 ],44 },45 },46 },47 ],48 sourceType: "script",49 type: "Program",50 });51 });52 it("should parse `Hello012World`", () => {53 assert.match<Program>(parseScript(src + "`Hello\\012World`"), {54 type: "Program",55 body: [56 {57 type: "ExpressionStatement",58 expression: {59 type: "TaggedTemplateExpression",60 tag: node,61 quasi: {62 type: "TemplateLiteral",63 expressions: [],64 quasis: [65 {66 type: "TemplateElement",67 value: {68 cooked: "Hello\nWorld",69 raw: "Hello\\012World",70 },71 tail: true,72 },73 ],74 },75 },76 },77 ],78 sourceType: "script",79 });80 });81 it("should parse `Hello\\122World`", () => {82 assert.match<Program>(parseScript(src + "`Hello\\122World`"), {83 type: "Program",84 body: [85 {86 type: "ExpressionStatement",87 expression: {88 type: "TaggedTemplateExpression",89 tag: node,90 quasi: {91 type: "TemplateLiteral",92 expressions: [],93 quasis: [94 {95 type: "TemplateElement",96 value: {97 cooked: "HelloRWorld",98 raw: "Hello\\122World",99 },100 tail: true,101 },102 ],103 },104 },105 },106 ],107 sourceType: "script",108 });109 });110 it("should parse `Hello\\0122World`", () => {111 assert.match<Program>(parseScript(src + "`Hello\\0122World`"), {112 type: "Program",113 body: [114 {115 type: "ExpressionStatement",116 expression: {117 type: "TaggedTemplateExpression",118 tag: node,119 quasi: {120 type: "TemplateLiteral",121 expressions: [],122 quasis: [123 {124 type: "TemplateElement",125 value: {126 cooked: "Hello\n2World",127 raw: "Hello\\0122World",128 },129 tail: true,130 },131 ],132 },133 },134 },135 ],136 sourceType: "script",137 });138 });139 it("should parse `Hello\\312World`", () => {140 assert.match<Program>(parseScript(src + "`Hello\\312World`"), {141 type: "Program",142 body: [143 {144 type: "ExpressionStatement",145 expression: {146 type: "TaggedTemplateExpression",147 tag: node,148 quasi: {149 type: "TemplateLiteral",150 expressions: [],151 quasis: [152 {153 type: "TemplateElement",154 value: {155 cooked: "HelloÊWorld",156 raw: "Hello\\312World",157 },158 tail: true,159 },160 ],161 },162 },163 },164 ],165 sourceType: "script",166 });167 });168 it("should parse `Hello\\412World`", () => {169 assert.match<Program>(parseScript(src + "`Hello\\412World`"), {170 type: "Program",171 body: [172 {173 type: "ExpressionStatement",174 expression: {175 type: "TaggedTemplateExpression",176 tag: node,177 quasi: {178 type: "TemplateLiteral",179 expressions: [],180 quasis: [181 {182 type: "TemplateElement",183 value: {184 cooked: "Hello!2World",185 raw: "Hello\\412World",186 },187 tail: true,188 },189 ],190 },191 },192 },193 ],194 sourceType: "script",195 });196 });197 it("should parse `Hello\\712World`", () => {198 assert.match<Program>(parseScript(src + "`Hello\\712World`"), {199 type: "Program",200 body: [201 {202 type: "ExpressionStatement",203 expression: {204 type: "TaggedTemplateExpression",205 tag: node,206 quasi: {207 type: "TemplateLiteral",208 expressions: [],209 quasis: [210 {211 type: "TemplateElement",212 value: {213 cooked: "Hello92World",214 raw: "Hello\\712World",215 },216 tail: true,217 },218 ],219 },220 },221 },222 ],223 sourceType: "script",224 });225 });226 it("should parse `Hello\\0World`", () => {227 assert.match<Program>(parseScript(src + "`Hello\\0World`"), {228 type: "Program",229 body: [230 {231 type: "ExpressionStatement",232 expression: {233 type: "TaggedTemplateExpression",234 tag: node,235 quasi: {236 type: "TemplateLiteral",237 expressions: [],238 quasis: [239 {240 type: "TemplateElement",241 value: {242 cooked: "Hello\u0000World",243 raw: "Hello\\0World",244 },245 tail: true,246 },247 ],248 },249 },250 },251 ],252 sourceType: "script",253 });254 });255 it("should parse `Hello\\1World`", () => {256 assert.match<Program>(parseScript(src + "`Hello\\1World`"), {257 type: "Program",258 body: [259 {260 type: "ExpressionStatement",261 expression: {262 type: "TaggedTemplateExpression",263 tag: node,264 quasi: {265 type: "TemplateLiteral",266 expressions: [],267 quasis: [268 {269 type: "TemplateElement",270 value: {271 cooked: "Hello\x01World",272 raw: "Hello\\1World",273 },274 tail: true,275 },276 ],277 },278 },279 },280 ],281 sourceType: "script",282 });283 });284 it("should parse `\\0`", () => {285 assert.match<Program>(parseScript("(" + src + "`\\0`)"), {286 type: "Program",287 body: [288 {289 expression: {290 type: "TaggedTemplateExpression",291 tag: node,292 quasi: {293 type: "TemplateLiteral",294 expressions: [],295 quasis: [296 {297 type: "TemplateElement",298 value: {299 cooked: "\0",300 raw: "\\0",301 },302 tail: true,303 },304 ],305 },306 },307 type: "ExpressionStatement",308 },309 ],310 sourceType: "script",311 });312 });313 it("should parse `\\7a`", () => {314 assert.match<Program>(parseScript("(" + src + "`\\7a`)"), {315 type: "Program",316 body: [317 {318 expression: {319 type: "TaggedTemplateExpression",320 tag: node,321 quasi: {322 type: "TemplateLiteral",323 expressions: [],324 quasis: [325 {326 type: "TemplateElement",327 value: {328 cooked: "\x7a",329 raw: "\\7a",330 },331 tail: true,332 },333 ],334 },335 },336 type: "ExpressionStatement",337 },338 ],339 sourceType: "script",340 });341 });342 it("should not parse unmatched single `", () => {343 assert.throws(SyntaxError, () => parseScript(src + "`"));344 });345 it("should not parse parenthesized unmatched single `", () => {346 assert.throws(SyntaxError, () => parseScript("(" + src + "`)"));347 });348 it("should parse `\\8`", () => {349 assert.match<Program>(parseScript("(" + src + "`\\8`)"), {350 type: "Program",351 body: [352 {353 expression: {354 type: "TaggedTemplateExpression",355 tag: node,356 quasi: {357 type: "TemplateLiteral",358 expressions: [],359 quasis: [360 {361 type: "TemplateElement",362 value: {363 cooked: "8",364 raw: "\\8",365 },366 tail: true,367 },368 ],369 },370 },371 type: "ExpressionStatement",372 },373 ],374 sourceType: "script",375 });376 });377 it("should parse `\\9`", () => {378 assert.match<Program>(parseScript("(" + src + "`\\9`)"), {379 type: "Program",380 body: [381 {382 expression: {383 type: "TaggedTemplateExpression",384 tag: node,385 quasi: {386 type: "TemplateLiteral",387 expressions: [],388 quasis: [389 {390 type: "TemplateElement",391 value: {392 cooked: null,393 raw: "\\9",394 },395 tail: true,396 },397 ],398 },399 },400 type: "ExpressionStatement",401 },402 ],403 sourceType: "script",404 });405 });406 it("should parse `\\x0`", () => {407 assert.match<Program>(parseScript("(" + src + "`\\x0`)"), {408 type: "Program",409 body: [410 {411 expression: {412 type: "TaggedTemplateExpression",413 tag: node,414 quasi: {415 type: "TemplateLiteral",416 expressions: [],417 quasis: [418 {419 type: "TemplateElement",420 value: {421 cooked: null,422 raw: "\\x0",423 },424 tail: true,425 },426 ],427 },428 },429 type: "ExpressionStatement",430 },431 ],432 sourceType: "script",433 });434 });435 it("should parse `\u2028`", () => {436 assert.match<Program>(parseScript("(" + src + "`\u2028`)"), {437 type: "Program",438 body: [439 {440 expression: {441 type: "TaggedTemplateExpression",442 tag: node,443 quasi: {444 type: "TemplateLiteral",445 expressions: [],446 quasis: [447 {448 type: "TemplateElement",449 value: {450 cooked: "\u2028",451 raw: "\u2028",452 },453 tail: true,454 },455 ],456 },457 },458 type: "ExpressionStatement",459 },460 ],461 sourceType: "script",462 });463 });464 it("should parse `\u2029`", () => {465 assert.match<Program>(parseScript("(" + src + "`\u2029`)"), {466 type: "Program",467 body: [468 {469 expression: {470 type: "TaggedTemplateExpression",471 tag: node,472 quasi: {473 type: "TemplateLiteral",474 expressions: [],475 quasis: [476 {477 type: "TemplateElement",478 value: {479 cooked: "\u2029",480 raw: "\u2029",481 },482 tail: true,483 },484 ],485 },486 },487 type: "ExpressionStatement",488 },489 ],490 sourceType: "script",491 });492 });493 it("should parse `\\u{2028`", () => {494 assert.match<Program>(parseScript("(" + src + "`\\u{2028`)"), {495 type: "Program",496 body: [497 {498 expression: {499 type: "TaggedTemplateExpression",500 tag: node,501 quasi: {502 type: "TemplateLiteral",503 expressions: [],504 quasis: [505 {506 type: "TemplateElement",507 value: {508 cooked: null,509 raw: "\\u{2028",510 },511 tail: true,512 },513 ],514 },515 },516 type: "ExpressionStatement",517 },518 ],519 sourceType: "script",520 });521 });522 it("should parse strict `\\1`", () => {523 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\1`)"), {524 type: "Program",525 body: [526 {527 expression: {528 type: "TaggedTemplateExpression",529 tag: node,530 quasi: {531 type: "TemplateLiteral",532 expressions: [],533 quasis: [534 {535 type: "TemplateElement",536 value: {537 cooked: null,538 raw: "\\1",539 },540 tail: true,541 },542 ],543 },544 },545 type: "ExpressionStatement",546 },547 ],548 sourceType: "script",549 });550 });551 it("should parse strict `\\4`", () => {552 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\4`)"), {553 type: "Program",554 body: [555 {556 expression: {557 type: "TaggedTemplateExpression",558 tag: node,559 quasi: {560 type: "TemplateLiteral",561 expressions: [],562 quasis: [563 {564 type: "TemplateElement",565 value: {566 cooked: null,567 raw: "\\4",568 },569 tail: true,570 },571 ],572 },573 },574 type: "ExpressionStatement",575 },576 ],577 sourceType: "script",578 });579 });580 it("should parse strict `\\11`", () => {581 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\11`)"), {582 type: "Program",583 body: [584 {585 expression: {586 type: "TaggedTemplateExpression",587 tag: node,588 quasi: {589 type: "TemplateLiteral",590 expressions: [],591 quasis: [592 {593 type: "TemplateElement",594 value: {595 cooked: "\\undefined1",596 raw: "\\11",597 },598 tail: true,599 },600 ],601 },602 },603 type: "ExpressionStatement",604 },605 ],606 sourceType: "script",607 });608 });609 it("should parse strict `\\000`", () => {610 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\000`)"), {611 type: "Program",612 body: [613 {614 expression: {615 type: "TaggedTemplateExpression",616 tag: node,617 quasi: {618 type: "TemplateLiteral",619 expressions: [],620 quasis: [621 {622 type: "TemplateElement",623 value: {624 cooked: "\\undefined0",625 raw: "\\000",626 },627 tail: true,628 },629 ],630 },631 },632 type: "ExpressionStatement",633 },634 ],635 sourceType: "script",636 });637 });638 it("should parse strict `\\123`", () => {639 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\123`)"), {640 type: "Program",641 body: [642 {643 expression: {644 type: "TaggedTemplateExpression",645 tag: node,646 quasi: {647 type: "TemplateLiteral",648 expressions: [],649 quasis: [650 {651 type: "TemplateElement",652 value: {653 cooked: "\\undefined23",654 raw: "\\123",655 },656 tail: true,657 },658 ],659 },660 },661 type: "ExpressionStatement",662 },663 ],664 sourceType: "script",665 });666 });667 it("should parse `\\u{110000}`", () => {668 assert.match<Program>(parseScript("(" + src + "`\\u{110000}`)"), {669 type: "Program",670 body: [671 {672 expression: {673 type: "TaggedTemplateExpression",674 tag: node,675 quasi: {676 type: "TemplateLiteral",677 expressions: [],678 quasis: [679 {680 type: "TemplateElement",681 value: {682 cooked: null,683 raw: "\\u{110000}",684 },685 tail: true,686 },687 ],688 },689 },690 type: "ExpressionStatement",691 },692 ],693 sourceType: "script",694 });695 });696 it("should parse `\\u{FFFFFFF}`", () => {697 assert.match<Program>(parseScript("(" + src + "`\\u{FFFFFFF}`)"), {698 type: "Program",699 body: [700 {701 expression: {702 type: "TaggedTemplateExpression",703 tag: node,704 quasi: {705 type: "TemplateLiteral",706 expressions: [],707 quasis: [708 {709 type: "TemplateElement",710 value: {711 cooked: null,712 raw: "\\u{FFFFFFF}",713 },714 tail: true,715 },716 ],717 },718 },719 type: "ExpressionStatement",720 },721 ],722 sourceType: "script",723 });724 });725 it("should parse Unicode escape", () => {726 assert.match<Program>(parseScript(src + "`\u2E2F;`"), {727 body: [728 {729 expression: {730 type: "TaggedTemplateExpression",731 tag: node,732 quasi: {733 type: "TemplateLiteral",734 expressions: [],735 quasis: [736 {737 type: "TemplateElement",738 value: {739 cooked: "ⸯ;",740 raw: "\u2E2F;",741 },742 tail: true,743 },744 ],745 },746 },747 type: "ExpressionStatement",748 },749 ],750 sourceType: "script",751 type: "Program",752 });753 });754 it("should parse carrian letter ES2015", () => {755 assert.match<Program>(parseScript(src + "`\u{102A7};`"), {756 body: [757 {758 expression: {759 type: "TaggedTemplateExpression",760 tag: node,761 quasi: {762 type: "TemplateLiteral",763 expressions: [],764 quasis: [765 {766 type: "TemplateElement",767 value: {768 cooked: "𐊧;",769 raw: "\u{102A7};",770 },771 tail: true,772 },773 ],774 },775 },776 type: "ExpressionStatement",777 },778 ],779 sourceType: "script",780 type: "Program",781 });782 });783 it("should parse `Hello`", () => {784 assert.match<Program>(parseScript(src + "`Hello`"), {785 type: "Program",786 body: [787 {788 type: "ExpressionStatement",789 expression: {790 type: "TaggedTemplateExpression",791 tag: node,792 quasi: {793 type: "TemplateLiteral",794 expressions: [],795 quasis: [796 {797 type: "TemplateElement",798 value: {799 cooked: "Hello",800 raw: "Hello",801 },802 tail: true,803 },804 ],805 },806 },807 },808 ],809 sourceType: "script",810 });811 });812 it("should parse `\n\r\t\v\b\f\\'\\\"\0`", () => {813 assert.match<Program>(parseScript(src + "`\n\r\t\v\b\f\\'\\\"\0`"), {814 type: "Program",815 body: [816 {817 type: "ExpressionStatement",818 expression: {819 type: "TaggedTemplateExpression",820 tag: node,821 quasi: {822 type: "TemplateLiteral",823 expressions: [],824 quasis: [825 {826 type: "TemplateElement",827 value: {828 cooked: "\n\r\t\v\b\f\'\"\0",829 raw: "\n\r\t\v\b\f\\\'\"\0",830 },831 tail: true,832 },833 ],834 },835 },836 },837 ],838 sourceType: "script",839 });840 });841 it("should parse `\\u0061`", () => {842 assert.match<Program>(parseScript("var source = " + src + "`\\u0061`;"), {843 type: "Program",844 body: [845 {846 type: "VariableDeclaration",847 declarations: [848 {849 type: "VariableDeclarator",850 id: {851 type: "Identifier",852 name: "source",853 },854 init: {855 type: "TemplateLiteral",856 expressions: [],857 quasis: [858 {859 type: "TemplateElement",860 value: {861 cooked: "a",862 raw: "\\u0061",863 },864 tail: true,865 },866 ],867 },868 },869 ],870 kind: "var",871 },872 ],873 sourceType: "script",874 });875 });876 it("should parse `\\x61`", () => {877 assert.match<Program>(parseScript(src + "`\\x61`;"), {878 type: "Program",879 body: [880 {881 type: "ExpressionStatement",882 expression: {883 type: "TaggedTemplateExpression",884 tag: node,885 quasi: {886 type: "TemplateLiteral",887 expressions: [],888 quasis: [889 {890 type: "TemplateElement",891 value: {892 cooked: "a",893 raw: "\\x61",894 },895 tail: true,896 },897 ],898 },899 },900 },901 ],902 sourceType: "script",903 });904 });905 it("should parse `Hello\\02World`", () => {906 assert.match<Program>(parseScript(src + "`Hello\\02World`"), {907 type: "Program",908 body: [909 {910 type: "ExpressionStatement",911 expression: {912 type: "TaggedTemplateExpression",913 tag: node,914 quasi: {915 type: "TemplateLiteral",916 expressions: [],917 quasis: [918 {919 type: "TemplateElement",920 value: {921 cooked: "Hello\u0002World",922 raw: "Hello\\02World",923 },924 tail: true,925 },926 ],927 },928 },929 },930 ],931 sourceType: "script",932 });933 });934 it("should parse `Hello\\0World`", () => {935 assert.match<Program>(parseScript(src + "`Hello\\0World`"), {936 type: "Program",937 body: [938 {939 type: "ExpressionStatement",940 expression: {941 type: "TaggedTemplateExpression",942 tag: node,943 quasi: {944 type: "TemplateLiteral",945 expressions: [],946 quasis: [947 {948 type: "TemplateElement",949 value: {950 cooked: "Hello\0World",951 raw: "Hello\\0World",952 },953 tail: true,954 },955 ],956 },957 },958 },959 ],960 sourceType: "script",961 });962 });963 it("should parse `x`", () => {964 assert.match<Program>(parseScript("(" + src + "`x`)"), {965 type: "Program",966 body: [967 {968 type: "ExpressionStatement",969 expression: {970 type: "TaggedTemplateExpression",971 tag: node,972 quasi: {973 type: "TemplateLiteral",974 expressions: [],975 quasis: [976 {977 type: "TemplateElement",978 value: {979 cooked: "x",980 raw: "x",981 },982 tail: true,983 },984 ],985 },986 },987 },988 ],989 sourceType: "script",990 });991 });992 it("should parse `\\u{0000000000F8}`", () => {993 assert.match<Program>(parseScript("(" + src + "`\\u{0000000000F8}`)"), {994 type: "Program",995 body: [996 {997 type: "ExpressionStatement",998 expression: {999 type: "TaggedTemplateExpression",1000 tag: node,1001 quasi: {1002 type: "TemplateLiteral",1003 expressions: [],1004 quasis: [1005 {1006 type: "TemplateElement",1007 value: {1008 cooked: "ø",1009 raw: "u{0000000000F8}",1010 },1011 tail: true,1012 },1013 ],1014 },1015 },1016 },1017 ],1018 sourceType: "script",1019 });1020 });1021 it("should parse `\\u{10FFFF}`", () => {1022 assert.match<Program>(parseScript("(" + src + "`\\u{10FFFF}`)"), {1023 type: "Program",1024 body: [1025 {1026 type: "ExpressionStatement",1027 expression: {1028 type: "TaggedTemplateExpression",1029 tag: node,1030 quasi: {1031 type: "TemplateLiteral",1032 expressions: [],1033 quasis: [1034 {1035 type: "TemplateElement",1036 value: {1037 cooked: "\u{10FFFF}",1038 raw: "\\u{10FFFF}",1039 },1040 tail: true,1041 },1042 ],1043 },1044 },1045 },1046 ],1047 sourceType: "script",1048 });1049 });1050 it("should parse `\\u{0}`", () => {1051 assert.match<Program>(parseScript("(" + src + "`\\u{0}`)"), {1052 type: "Program",1053 body: [1054 {1055 type: "ExpressionStatement",1056 expression: {1057 type: "TaggedTemplateExpression",1058 tag: node,1059 quasi: {1060 type: "TemplateLiteral",1061 expressions: [],1062 quasis: [1063 {1064 type: "TemplateElement",1065 value: {1066 cooked: "\0",1067 raw: "\\u{0}",1068 },1069 tail: true,1070 },1071 ],1072 },1073 },1074 },1075 ],1076 sourceType: "script",1077 });1078 });1079 it("should parse `\u{00F8}`", () => {1080 assert.match<Program>(parseScript("(" + src + "`\\u{00F8}`)"), {1081 type: "Program",1082 body: [1083 {1084 type: "ExpressionStatement",1085 expression: {1086 type: "TaggedTemplateExpression",1087 tag: node,1088 quasi: {1089 type: "TemplateLiteral",1090 expressions: [],1091 quasis: [1092 {1093 type: "TemplateElement",1094 value: {1095 cooked: "ø",1096 raw: "\\u{00F8}",1097 },1098 tail: true,1099 },1100 ],1101 },1102 },1103 },1104 ],1105 sourceType: "script",1106 });1107 });1108 it("should parse `\\a`", () => {1109 assert.match<Program>(parseScript("(" + src + "`\\a`)"), {1110 type: "Program",1111 body: [1112 {1113 type: "ExpressionStatement",1114 expression: {1115 type: "TaggedTemplateExpression",1116 tag: node,1117 quasi: {1118 type: "TemplateLiteral",1119 expressions: [],1120 quasis: [1121 {1122 type: "TemplateElement",1123 value: {1124 cooked: "a",1125 raw: "\\a",1126 },1127 tail: true,1128 },1129 ],1130 },1131 },1132 },1133 ],1134 sourceType: "script",1135 });1136 });1137 it("should parse `\\u202a`", () => {1138 assert.match<Program>(parseScript("(" + src + "`\u202a`)"), {1139 type: "Program",1140 body: [1141 {1142 type: "ExpressionStatement",1143 expression: {1144 type: "TaggedTemplateExpression",1145 tag: node,1146 quasi: {1147 type: "TemplateLiteral",1148 expressions: [],1149 quasis: [1150 {1151 type: "TemplateElement",1152 value: {1153 cooked: "\u202a",1154 raw: "\\u202a",1155 },1156 tail: true,1157 },1158 ],1159 },1160 },1161 },1162 ],1163 sourceType: "script",1164 });1165 });1166 it("should parse `\\\\\\``", () => {1167 assert.match<Program>(parseScript("(" + src + "`\\\\\\``)"), {1168 type: "Program",1169 body: [1170 {1171 type: "ExpressionStatement",1172 expression: {1173 type: "TaggedTemplateExpression",1174 tag: node,1175 quasi: {1176 type: "TemplateLiteral",1177 expressions: [],1178 quasis: [1179 {1180 type: "TemplateElement",1181 value: {1182 cooked: "\\`",1183 raw: "\\\\\\`",1184 },1185 tail: true,1186 },1187 ],1188 },1189 },1190 },1191 ],1192 sourceType: "script",1193 });1194 });1195 it("should parse `\\5111`", () => {1196 assert.match<Program>(parseScript("(" + src + "`\\5111`)"), {1197 type: "Program",1198 body: [1199 {1200 type: "ExpressionStatement",1201 expression: {1202 type: "TaggedTemplateExpression",1203 tag: node,1204 quasi: {1205 type: "TemplateLiteral",1206 expressions: [],1207 quasis: [1208 {1209 type: "TemplateElement",1210 value: {1211 cooked: ")11",1212 raw: "\\5111",1213 },1214 tail: true,1215 },1216 ],1217 },1218 },1219 },1220 ],1221 sourceType: "script",1222 });1223 });1224 it("should parse `\\2111`", () => {1225 assert.match<Program>(parseScript("(" + src + "`\\2111`)"), {1226 type: "Program",1227 body: [1228 {1229 type: "ExpressionStatement",1230 expression: {1231 type: "TaggedTemplateExpression",1232 tag: node,1233 quasi: {1234 type: "TemplateLiteral",1235 expressions: [],1236 quasis: [1237 {1238 type: "TemplateElement",1239 value: {1240 cooked: "1",1241 raw: "\\2111",1242 },1243 tail: true,1244 },1245 ],1246 },1247 },1248 },1249 ],1250 sourceType: "script",1251 });1252 });1253 it("should parse `\\11`", () => {1254 assert.match<Program>(parseScript("(" + src + "`\\11`)"), {1255 type: "Program",1256 body: [1257 {1258 type: "ExpressionStatement",1259 expression: {1260 type: "TaggedTemplateExpression",1261 tag: node,1262 quasi: {1263 type: "TemplateLiteral",1264 expressions: [],1265 quasis: [1266 {1267 type: "TemplateElement",1268 value: {1269 cooked: "\t",1270 raw: "\\11",1271 },1272 tail: true,1273 },1274 ],1275 },1276 },1277 },1278 ],1279 sourceType: "script",1280 });1281 });1282 it("should parse `\\111`", () => {1283 assert.match<Program>(parseScript("(" + src + "`\\111`)"), {1284 type: "Program",1285 body: [1286 {1287 type: "ExpressionStatement",1288 expression: {1289 type: "TaggedTemplateExpression",1290 tag: node,1291 quasi: {1292 type: "TemplateLiteral",1293 expressions: [],1294 quasis: [1295 {1296 type: "TemplateElement",1297 value: {1298 cooked: "I",1299 raw: "\\111",1300 },1301 tail: true,1302 },1303 ],1304 },1305 },1306 },1307 ],1308 sourceType: "script",1309 });1310 });1311 it("should parse `\\1111`", () => {1312 assert.match<Program>(parseScript("(" + src + "`\\1111`)"), {1313 type: "Program",1314 body: [1315 {1316 type: "ExpressionStatement",1317 expression: {1318 type: "TaggedTemplateExpression",1319 tag: node,1320 quasi: {1321 type: "TemplateLiteral",1322 expressions: [],1323 quasis: [1324 {1325 type: "TemplateElement",1326 value: {1327 cooked: "I1",1328 raw: "\\1111",1329 },1330 tail: true,1331 },1332 ],1333 },1334 },1335 },1336 ],1337 sourceType: "script",1338 });1339 });1340 it("should parse strict `\\0`", () => {1341 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\0`)"), {1342 body: [1343 {1344 expression: {1345 type: "Literal",1346 value: "use strict",1347 },1348 type: "ExpressionStatement",1349 },1350 {1351 expression: {1352 type: "TaggedTemplateExpression",1353 tag: node,1354 quasi: {1355 type: "TemplateLiteral",1356 expressions: [],1357 quasis: [1358 {1359 type: "TemplateElement",1360 value: {1361 cooked: "\0",1362 raw: "\\0",1363 },1364 tail: true,1365 },1366 ],1367 },1368 },1369 type: "ExpressionStatement",1370 },1371 ],1372 sourceType: "script",1373 type: "Program",1374 });1375 });1376 it("should parse use strict 0x", () => {1377 assert.match<Program>(parseScript("'use strict'; (" + src + "`\\0x`)"), {1378 body: [1379 {1380 expression: {1381 type: "Literal",1382 value: "use strict",1383 },1384 type: "ExpressionStatement",1385 },1386 {1387 expression: {1388 type: "TaggedTemplateExpression",1389 tag: node,1390 quasi: {1391 type: "TemplateLiteral",1392 expressions: [],1393 quasis: [1394 {1395 type: "TemplateElement",1396 value: {1397 cooked: "\0x",1398 raw: "\\0x",1399 },1400 tail: true,1401 },1402 ],1403 },1404 },1405 type: "ExpressionStatement",1406 },1407 ],1408 sourceType: "script",1409 type: "Program",1410 });1411 });1412 it("should parse `\\<CR>`", () => {1413 assert.match<Program>(parseScript("(" + src + "`\\\r`)"), {1414 type: "Program",1415 body: [1416 {1417 type: "ExpressionStatement",1418 expression: {1419 type: "TaggedTemplateExpression",1420 tag: node,1421 quasi: {1422 type: "TemplateLiteral",1423 expressions: [],1424 quasis: [1425 {1426 type: "TemplateElement",1427 value: {1428 cooked: "",1429 raw: "\\\r",1430 },1431 tail: true,1432 },1433 ],1434 },1435 },1436 },1437 ],1438 sourceType: "script",1439 });1440 });1441 it("should parse `\\9`", () => {1442 assert.match<Program>(parseScript("(`\\9`)"), {1443 type: "Program",1444 body: [1445 {1446 type: "ExpressionStatement",1447 expression: {1448 type: "TaggedTemplateExpression",1449 tag: node,1450 quasi: {1451 type: "TemplateLiteral",1452 expressions: [],1453 quasis: [1454 {1455 type: "TemplateElement",1456 value: {1457 cooked: null,1458 raw: "\\9",1459 },1460 tail: true,1461 },1462 ],1463 },1464 },1465 },1466 ],1467 sourceType: "script",1468 });1469 });1470 it("should parse invalid hex", () => {1471 assert.match<Program>(parseScript("`\\xFG`"), {1472 type: "Program",1473 body: [1474 {1475 type: "ExpressionStatement",1476 expression: {1477 type: "TaggedTemplateExpression",1478 tag: node,1479 quasi: {1480 type: "TemplateLiteral",1481 expressions: [],1482 quasis: [1483 {1484 type: "TemplateElement",1485 value: {1486 cooked: "\\undefinedG",1487 raw: "\\xFG",1488 },1489 tail: true,1490 },1491 ],1492 },1493 },1494 },1495 ],1496 sourceType: "script",1497 });1498 });1499 it("should parse invalid unicode hex", () => {1500 assert.match<Program>(parseScript("`\\u00FG`"), {1501 type: "Program",1502 body: [1503 {1504 type: "ExpressionStatement",1505 expression: {1506 type: "TaggedTemplateExpression",1507 tag: node,1508 quasi: {1509 type: "TemplateLiteral",1510 expressions: [],1511 quasis: [1512 {1513 type: "TemplateElement",1514 value: {1515 cooked: "\\undefinedG",1516 raw: "\\u00FG",1517 },1518 tail: true,1519 },1520 ],1521 },1522 },1523 },1524 ],1525 sourceType: "script",1526 });1527 });1528 it("expect `\\u` to throw", () => {1529 assert.match<Program>(parseScript("(`\\u`)"), {1530 type: "Program",1531 body: [1532 {1533 type: "ExpressionStatement",1534 expression: {1535 type: "TaggedTemplateExpression",1536 tag: node,1537 quasi: {1538 type: "TemplateLiteral",1539 expressions: [],1540 quasis: [1541 {1542 type: "TemplateElement",1543 value: {1544 cooked: null,1545 raw: "\\u",1546 },1547 tail: true,1548 },1549 ],1550 },1551 },1552 },1553 ],1554 sourceType: "script",1555 });1556 });1557 it("expect `\\x` to throw", () => {1558 assert.match<Program>(parseScript("(`\\x`)"), {1559 type: "Program",1560 body: [1561 {1562 type: "ExpressionStatement",1563 expression: {1564 type: "TaggedTemplateExpression",1565 tag: node,1566 quasi: {1567 type: "TemplateLiteral",1568 expressions: [],1569 quasis: [1570 {1571 type: "TemplateElement",1572 value: {1573 cooked: null,1574 raw: "\\x",1575 },1576 tail: true,1577 },1578 ],1579 },1580 },1581 },1582 ],1583 sourceType: "script",1584 });1585 });1586 it("expect `\\n` to throw", () => {1587 assert.match<Program>(parseScript("(`\n`)"), {1588 type: "Program",1589 body: [1590 {1591 type: "ExpressionStatement",1592 expression: {1593 type: "TaggedTemplateExpression",1594 tag: node,1595 quasi: {1596 type: "TemplateLiteral",1597 expressions: [],1598 quasis: [1599 {1600 type: "TemplateElement",1601 value: {1602 cooked: "\n",1603 raw: "\n",1604 },1605 tail: true,1606 },1607 ],1608 },1609 },1610 },1611 ],1612 sourceType: "script",1613 });1614 });...

Full Screen

Full Screen

templates.ts

Source:templates.ts Github

copy

Full Screen

1import {parseScript} from "../../../src";2import {Program} from "../../../src/estree";3import * as assert from "clean-assert";4describe.skip("Expressions - Templates", () => {5 it("should parse escaped backslash", () => {6 assert.match<Program>(parseScript("(`\\\\\\'`)"), {7 body: [8 {9 type: "ExpressionStatement",10 expression: {11 type: "TemplateLiteral",12 expressions: [],13 quasis: [14 {15 type: "TemplateElement",16 value: {17 cooked: "\\'",18 raw: "\\\\\\'",19 },20 tail: true,21 },22 ],23 },24 },25 ],26 sourceType: "script",27 type: "Program",28 });29 });30 it("should parse `Hello012World`", () => {31 assert.match<Program>(parseScript("`Hello\\012World`"), {32 type: "Program",33 body: [34 {35 type: "ExpressionStatement",36 expression: {37 type: "TemplateLiteral",38 expressions: [],39 quasis: [40 {41 type: "TemplateElement",42 value: {43 cooked: "Hello\nWorld",44 raw: "Hello\\012World",45 },46 tail: true,47 },48 ],49 },50 },51 ],52 sourceType: "script",53 });54 });55 it("should parse `Hello\\122World`", () => {56 assert.match<Program>(parseScript("`Hello\\122World`"), {57 type: "Program",58 body: [59 {60 type: "ExpressionStatement",61 expression: {62 type: "TemplateLiteral",63 expressions: [],64 quasis: [65 {66 type: "TemplateElement",67 value: {68 cooked: "HelloRWorld",69 raw: "Hello\\122World",70 },71 tail: true,72 },73 ],74 },75 },76 ],77 sourceType: "script",78 });79 });80 it("should parse `Hello\\0122World`", () => {81 assert.match<Program>(parseScript("`Hello\\0122World`"), {82 type: "Program",83 body: [84 {85 type: "ExpressionStatement",86 expression: {87 type: "TemplateLiteral",88 expressions: [],89 quasis: [90 {91 type: "TemplateElement",92 value: {93 cooked: "Hello\n2World",94 raw: "Hello\\0122World",95 },96 tail: true,97 },98 ],99 },100 },101 ],102 sourceType: "script",103 });104 });105 it("should parse `Hello\\312World`", () => {106 assert.match<Program>(parseScript("`Hello\\312World`"), {107 type: "Program",108 body: [109 {110 type: "ExpressionStatement",111 expression: {112 type: "TemplateLiteral",113 expressions: [],114 quasis: [115 {116 type: "TemplateElement",117 value: {118 cooked: "HelloÊWorld",119 raw: "Hello\\312World",120 },121 tail: true,122 },123 ],124 },125 },126 ],127 sourceType: "script",128 });129 });130 it("should parse `Hello\\412World`", () => {131 assert.match<Program>(parseScript("`Hello\\412World`"), {132 type: "Program",133 body: [134 {135 type: "ExpressionStatement",136 expression: {137 type: "TemplateLiteral",138 expressions: [],139 quasis: [140 {141 type: "TemplateElement",142 value: {143 cooked: "Hello!2World",144 raw: "Hello\\412World",145 },146 tail: true,147 },148 ],149 },150 },151 ],152 sourceType: "script",153 });154 });155 it("should parse `Hello\\712World`", () => {156 assert.match<Program>(parseScript("`Hello\\712World`"), {157 type: "Program",158 body: [159 {160 type: "ExpressionStatement",161 expression: {162 type: "TemplateLiteral",163 expressions: [],164 quasis: [165 {166 type: "TemplateElement",167 value: {168 cooked: "Hello92World",169 raw: "Hello\\712World",170 },171 tail: true,172 },173 ],174 },175 },176 ],177 sourceType: "script",178 });179 });180 it("should parse `Hello\\0World`", () => {181 assert.match<Program>(parseScript("`Hello\\0World`"), {182 type: "Program",183 body: [184 {185 type: "ExpressionStatement",186 expression: {187 type: "TemplateLiteral",188 expressions: [],189 quasis: [190 {191 type: "TemplateElement",192 value: {193 cooked: "Hello\u0000World",194 raw: "Hello\\0World",195 },196 tail: true,197 },198 ],199 },200 },201 ],202 sourceType: "script",203 });204 });205 it("should parse `Hello\\1World`", () => {206 assert.match<Program>(parseScript("`Hello\\1World`"), {207 type: "Program",208 body: [209 {210 type: "ExpressionStatement",211 expression: {212 type: "TemplateLiteral",213 expressions: [],214 quasis: [215 {216 type: "TemplateElement",217 value: {218 cooked: "Hello\x01World",219 raw: "Hello\\1World",220 },221 tail: true,222 },223 ],224 },225 },226 ],227 sourceType: "script",228 });229 });230 it("should parse `\\0`", () => {231 assert.match<Program>(parseScript("(`\\0`)"), {232 type: "Program",233 body: [234 {235 expression: {236 type: "TemplateLiteral",237 expressions: [],238 quasis: [239 {240 type: "TemplateElement",241 value: {242 cooked: "\0",243 raw: "\\0",244 },245 tail: true,246 },247 ],248 },249 type: "ExpressionStatement",250 },251 ],252 sourceType: "script",253 });254 });255 it("should parse `\\7a`", () => {256 assert.match<Program>(parseScript("(`\\7a`)"), {257 type: "Program",258 body: [259 {260 expression: {261 type: "TemplateLiteral",262 expressions: [],263 quasis: [264 {265 type: "TemplateElement",266 value: {267 cooked: "\x7a",268 raw: "\\7a",269 },270 tail: true,271 },272 ],273 },274 type: "ExpressionStatement",275 },276 ],277 sourceType: "script",278 });279 });280 it("should not parse unmatched single `", () => {281 assert.throws(SyntaxError, () => { parseScript("`"); });282 });283 it("should not parse parenthesized unmatched single `", () => {284 assert.throws(SyntaxError, () => { parseScript("(`)"); });285 });286 it("should parse `\\8`", () => {287 assert.match<Program>(parseScript("(`\\8`)"), {288 type: "Program",289 body: [290 {291 expression: {292 type: "TemplateLiteral",293 expressions: [],294 quasis: [295 {296 type: "TemplateElement",297 value: {298 cooked: "8",299 raw: "\\8",300 },301 tail: true,302 },303 ],304 },305 type: "ExpressionStatement",306 },307 ],308 sourceType: "script",309 });310 });311 it("should not parse `\\9`", () => {312 assert.throws(SyntaxError, () => { parseScript("(`\\9`)"); });313 });314 it("should parse `\\x0`", () => {315 assert.throws(SyntaxError, () => { parseScript("(`\\x0`)"); });316 });317 it("should parse `\u2028`", () => {318 assert.match<Program>(parseScript("(`\u2028`)"), {319 type: "Program",320 body: [321 {322 expression: {323 type: "TemplateLiteral",324 expressions: [],325 quasis: [326 {327 type: "TemplateElement",328 value: {329 cooked: "\u2028",330 raw: "\u2028",331 },332 tail: true,333 },334 ],335 },336 type: "ExpressionStatement",337 },338 ],339 sourceType: "script",340 });341 });342 it("should parse `\u2029`", () => {343 assert.match<Program>(parseScript("(`\u2029`)"), {344 type: "Program",345 body: [346 {347 expression: {348 type: "TemplateLiteral",349 expressions: [],350 quasis: [351 {352 type: "TemplateElement",353 value: {354 cooked: "\u2029",355 raw: "\u2029",356 },357 tail: true,358 },359 ],360 },361 type: "ExpressionStatement",362 },363 ],364 sourceType: "script",365 });366 });367 it("should parse `\\u{2028`", () => {368 assert.throws(SyntaxError, () => { parseScript("(`\\u{2028`)"); });369 });370 it("should parse strict `\\1`", () => {371 assert.throws(SyntaxError, () => { parseScript("'use strict'; (`\\1`)"); });372 });373 it("should parse strict `\\4`", () => {374 assert.throws(SyntaxError, () => { parseScript("'use strict'; (`\\4`)"); });375 });376 it("should parse strict `\\11`", () => {377 assert.throws(SyntaxError, () => { parseScript("'use strict'; (`\\11`)"); });378 });379 it("should parse strict `\\000`", () => {380 assert.throws(SyntaxError, () => { parseScript("'use strict'; (`\\000`)"); });381 });382 it("should parse strict `\\123`", () => {383 assert.throws(SyntaxError, () => { parseScript("'use strict'; (`\\123`)"); });384 });385 it("should parse `\\u{110000}`", () => {386 assert.throws(SyntaxError, () => { parseScript("(`\\u{110000}`)"); });387 });388 it("should parse `\\u{FFFFFFF}`", () => {389 assert.throws(SyntaxError, () => { parseScript("(`\\u{FFFFFFF}`)"); });390 });391 it("should parse Unicode escape", () => {392 assert.match<Program>(parseScript("`\u2E2F;`"), {393 body: [394 {395 expression: {396 type: "TemplateLiteral",397 expressions: [],398 quasis: [399 {400 type: "TemplateElement",401 value: {402 cooked: "ⸯ;",403 raw: "\u2E2F;",404 },405 tail: true,406 },407 ],408 },409 type: "ExpressionStatement",410 },411 ],412 sourceType: "script",413 type: "Program",414 });415 });416 it("should parse carrian letter ES2015", () => {417 assert.match<Program>(parseScript("`\u{102A7};`"), {418 body: [419 {420 expression: {421 type: "TemplateLiteral",422 expressions: [],423 quasis: [424 {425 type: "TemplateElement",426 value: {427 cooked: "𐊧;",428 raw: "\u{102A7};",429 },430 tail: true,431 },432 ],433 },434 type: "ExpressionStatement",435 },436 ],437 sourceType: "script",438 type: "Program",439 });440 });441 it("should parse `Hello`", () => {442 assert.match<Program>(parseScript("`Hello`"), {443 type: "Program",444 body: [445 {446 type: "ExpressionStatement",447 expression: {448 type: "TemplateLiteral",449 expressions: [],450 quasis: [451 {452 type: "TemplateElement",453 value: {454 cooked: "Hello",455 raw: "Hello",456 },457 tail: true,458 },459 ],460 },461 },462 ],463 sourceType: "script",464 });465 });466 it("should parse `\n\r\t\v\b\f\\'\\\"\0`", () => {467 assert.match<Program>(parseScript("`\n\r\t\v\b\f\\'\\\"\0`"), {468 type: "Program",469 body: [470 {471 type: "ExpressionStatement",472 expression: {473 type: "TemplateLiteral",474 expressions: [],475 quasis: [476 {477 type: "TemplateElement",478 value: {479 cooked: "\n\r\t\v\b\f\'\"\0",480 raw: "\n\r\t\v\b\f\\\'\"\0",481 },482 tail: true,483 },484 ],485 },486 },487 ],488 sourceType: "script",489 });490 });491 it("should parse `\\u0061`", () => {492 assert.match<Program>(parseScript("var source = `\\u0061`;"), {493 type: "Program",494 body: [495 {496 type: "VariableDeclaration",497 declarations: [498 {499 type: "VariableDeclarator",500 id: {501 type: "Identifier",502 name: "source",503 },504 init: {505 type: "TemplateLiteral",506 expressions: [],507 quasis: [508 {509 type: "TemplateElement",510 value: {511 cooked: "a",512 raw: "\\u0061",513 },514 tail: true,515 },516 ],517 },518 },519 ],520 kind: "var",521 },522 ],523 sourceType: "script",524 });525 });526 it("should parse `\\x61`", () => {527 assert.match<Program>(parseScript("`\\x61`;"), {528 type: "Program",529 body: [530 {531 type: "ExpressionStatement",532 expression: {533 type: "TemplateLiteral",534 expressions: [],535 quasis: [536 {537 type: "TemplateElement",538 value: {539 cooked: "a",540 raw: "\\x61",541 },542 tail: true,543 },544 ],545 },546 },547 ],548 sourceType: "script",549 });550 });551 it("should parse `Hello\\02World`", () => {552 assert.match<Program>(parseScript("`Hello\\02World`"), {553 type: "Program",554 body: [555 {556 type: "ExpressionStatement",557 expression: {558 type: "TemplateLiteral",559 expressions: [],560 quasis: [561 {562 type: "TemplateElement",563 value: {564 cooked: "Hello\u0002World",565 raw: "Hello\\02World",566 },567 tail: true,568 },569 ],570 },571 },572 ],573 sourceType: "script",574 });575 });576 it("should parse `Hello\\0World`", () => {577 assert.match<Program>(parseScript("`Hello\\0World`"), {578 type: "Program",579 body: [580 {581 type: "ExpressionStatement",582 expression: {583 type: "TemplateLiteral",584 expressions: [],585 quasis: [586 {587 type: "TemplateElement",588 value: {589 cooked: "Hello\0World",590 raw: "Hello\\0World",591 },592 tail: true,593 },594 ],595 },596 },597 ],598 sourceType: "script",599 });600 });601 it("should parse `x`", () => {602 assert.match<Program>(parseScript("(`x`)"), {603 type: "Program",604 body: [605 {606 type: "ExpressionStatement",607 expression: {608 type: "TemplateLiteral",609 expressions: [],610 quasis: [611 {612 type: "TemplateElement",613 value: {614 cooked: "x",615 raw: "x",616 },617 tail: true,618 },619 ],620 },621 },622 ],623 sourceType: "script",624 });625 });626 it("should parse `\\u{0000000000F8}`", () => {627 assert.match<Program>(parseScript("(`\\u{0000000000F8}`)"), {628 type: "Program",629 body: [630 {631 type: "ExpressionStatement",632 expression: {633 type: "TemplateLiteral",634 expressions: [],635 quasis: [636 {637 type: "TemplateElement",638 value: {639 cooked: "ø",640 raw: "u{0000000000F8}",641 },642 tail: true,643 },644 ],645 },646 },647 ],648 sourceType: "script",649 });650 });651 it("should parse `\\u{10FFFF}`", () => {652 assert.match<Program>(parseScript("(`\\u{10FFFF}`)"), {653 type: "Program",654 body: [655 {656 type: "ExpressionStatement",657 expression: {658 type: "TemplateLiteral",659 expressions: [],660 quasis: [661 {662 type: "TemplateElement",663 value: {664 cooked: "\u{10FFFF}",665 raw: "\\u{10FFFF}",666 },667 tail: true,668 },669 ],670 },671 },672 ],673 sourceType: "script",674 });675 });676 it("should parse `\\u{0}`", () => {677 assert.match<Program>(parseScript("(`\\u{0}`)"), {678 type: "Program",679 body: [680 {681 type: "ExpressionStatement",682 expression: {683 type: "TemplateLiteral",684 expressions: [],685 quasis: [686 {687 type: "TemplateElement",688 value: {689 cooked: "\0",690 raw: "\\u{0}",691 },692 tail: true,693 },694 ],695 },696 },697 ],698 sourceType: "script",699 });700 });701 it("should parse `\u{00F8}`", () => {702 assert.match<Program>(parseScript("(`\\u{00F8}`)"), {703 type: "Program",704 body: [705 {706 type: "ExpressionStatement",707 expression: {708 type: "TemplateLiteral",709 expressions: [],710 quasis: [711 {712 type: "TemplateElement",713 value: {714 cooked: "ø",715 raw: "\\u{00F8}",716 },717 tail: true,718 },719 ],720 },721 },722 ],723 sourceType: "script",724 });725 });726 it("should parse `\\a`", () => {727 assert.match<Program>(parseScript("(`\\a`)"), {728 type: "Program",729 body: [730 {731 type: "ExpressionStatement",732 expression: {733 type: "TemplateLiteral",734 expressions: [],735 quasis: [736 {737 type: "TemplateElement",738 value: {739 cooked: "a",740 raw: "\\a",741 },742 tail: true,743 },744 ],745 },746 },747 ],748 sourceType: "script",749 });750 });751 it("should parse `\\u202a`", () => {752 assert.match<Program>(parseScript("(`\u202a`)"), {753 type: "Program",754 body: [755 {756 type: "ExpressionStatement",757 expression: {758 type: "TemplateLiteral",759 expressions: [],760 quasis: [761 {762 type: "TemplateElement",763 value: {764 cooked: "\u202a",765 raw: "\\u202a",766 },767 tail: true,768 },769 ],770 },771 },772 ],773 sourceType: "script",774 });775 });776 it("should parse `\\\\\\``", () => {777 assert.match<Program>(parseScript("(`\\\\\\``)"), {778 type: "Program",779 body: [780 {781 type: "ExpressionStatement",782 expression: {783 type: "TemplateLiteral",784 expressions: [],785 quasis: [786 {787 type: "TemplateElement",788 value: {789 cooked: "\\`",790 raw: "\\\\\\`",791 },792 tail: true,793 },794 ],795 },796 },797 ],798 sourceType: "script",799 });800 });801 it("should parse `\\5111`", () => {802 assert.match<Program>(parseScript("(`\\5111`)"), {803 type: "Program",804 body: [805 {806 type: "ExpressionStatement",807 expression: {808 type: "TemplateLiteral",809 expressions: [],810 quasis: [811 {812 type: "TemplateElement",813 value: {814 cooked: ")11",815 raw: "\\5111",816 },817 tail: true,818 },819 ],820 },821 },822 ],823 sourceType: "script",824 });825 });826 it("should parse `\\2111`", () => {827 assert.match<Program>(parseScript("(`\\2111`)"), {828 type: "Program",829 body: [830 {831 type: "ExpressionStatement",832 expression: {833 type: "TemplateLiteral",834 expressions: [],835 quasis: [836 {837 type: "TemplateElement",838 value: {839 cooked: "1",840 raw: "\\2111",841 },842 tail: true,843 },844 ],845 },846 },847 ],848 sourceType: "script",849 });850 });851 it("should parse `\\11`", () => {852 assert.match<Program>(parseScript("(`\\11`)"), {853 type: "Program",854 body: [855 {856 type: "ExpressionStatement",857 expression: {858 type: "TemplateLiteral",859 expressions: [],860 quasis: [861 {862 type: "TemplateElement",863 value: {864 cooked: "\t",865 raw: "\\11",866 },867 tail: true,868 },869 ],870 },871 },872 ],873 sourceType: "script",874 });875 });876 it("should parse `\\111`", () => {877 assert.match<Program>(parseScript("(`\\111`)"), {878 type: "Program",879 body: [880 {881 type: "ExpressionStatement",882 expression: {883 type: "TemplateLiteral",884 expressions: [],885 quasis: [886 {887 type: "TemplateElement",888 value: {889 cooked: "I",890 raw: "\\111",891 },892 tail: true,893 },894 ],895 },896 },897 ],898 sourceType: "script",899 });900 });901 it("should parse `\\1111`", () => {902 assert.match<Program>(parseScript("(`\\1111`)"), {903 type: "Program",904 body: [905 {906 type: "ExpressionStatement",907 expression: {908 type: "TemplateLiteral",909 expressions: [],910 quasis: [911 {912 type: "TemplateElement",913 value: {914 cooked: "I1",915 raw: "\\1111",916 },917 tail: true,918 },919 ],920 },921 },922 ],923 sourceType: "script",924 });925 });926 it("should parse strict `\\0`", () => {927 assert.match<Program>(parseScript("'use strict'; (`\\0`)"), {928 body: [929 {930 expression: {931 type: "Literal",932 value: "use strict",933 },934 type: "ExpressionStatement",935 },936 {937 expression: {938 type: "TemplateLiteral",939 expressions: [],940 quasis: [941 {942 type: "TemplateElement",943 value: {944 cooked: "\0",945 raw: "\\0",946 },947 tail: true,948 },949 ],950 },951 type: "ExpressionStatement",952 },953 ],954 sourceType: "script",955 type: "Program",956 });957 });958 it("should parse use strict 0x", () => {959 assert.match<Program>(parseScript("'use strict'; (`\\0x`)"), {960 body: [961 {962 expression: {963 type: "Literal",964 value: "use strict",965 },966 type: "ExpressionStatement",967 },968 {969 expression: {970 type: "TemplateLiteral",971 expressions: [],972 quasis: [973 {974 type: "TemplateElement",975 value: {976 cooked: "\0x",977 raw: "\\0x",978 },979 tail: true,980 },981 ],982 },983 type: "ExpressionStatement",984 },985 ],986 sourceType: "script",987 type: "Program",988 });989 });990 it("should parse `\\<CR>`", () => {991 assert.match<Program>(parseScript("(`\\\r`)"), {992 type: "Program",993 body: [994 {995 type: "ExpressionStatement",996 expression: {997 type: "TemplateLiteral",998 expressions: [],999 quasis: [1000 {1001 type: "TemplateElement",1002 value: {1003 cooked: "",1004 raw: "\\\r",1005 },1006 tail: true,1007 },1008 ],1009 },1010 },1011 ],1012 sourceType: "script",1013 });1014 });1015 it("expect \"u2029\" to throw", () => {1016 assert.throws(SyntaxError, () => { parseScript("('\u2029')"); });1017 });1018 it("expect \"u2028\" to throw", () => {1019 assert.throws(SyntaxError, () => { parseScript("('\u2028')"); });1020 });1021 it("expect \"u{2028\" to throw", () => {1022 assert.throws(SyntaxError, () => { parseScript("('\\u{2028')"); });1023 });1024 it("expect \"9\"\" to throw", () => {1025 assert.throws(SyntaxError, () => { parseScript("('\\9')"); });1026 });1027 it("expect invalid hex to throw", () => {1028 assert.throws(SyntaxError, () => { parseScript("\\xFG"); });1029 });1030 it("expect invalid escaped hex to throw", () => {1031 assert.throws(SyntaxError, () => { parseScript("\\u00FG"); });1032 assert.throws(SyntaxError, () => { parseScript("('\\u00FG')"); });1033 });1034 it("expect \"8\"\" to throw", () => {1035 assert.throws(SyntaxError, () => { parseScript("('\\8')"); });1036 });1037 it("expect \"u\"\" to throw", () => {1038 assert.throws(SyntaxError, () => { parseScript("('\\u')"); });1039 });1040 it("expect \"x\"\" to throw", () => {1041 assert.throws(SyntaxError, () => { parseScript("('\\x')"); });1042 });1043 it("expect \"n\"\" to throw", () => {1044 assert.throws(SyntaxError, () => { parseScript("('\n')"); });1045 });1046 it("expect slash to throw", () => {1047 assert.throws(SyntaxError, () => { parseScript("(')"); });1048 assert.throws(SyntaxError, () => { parseScript("'"); });1049 });1050 it("expect \" to throw", () => {1051 assert.throws(SyntaxError, () => { parseScript("\""); });1052 });1053 it("expect \"u2E2F\" to throw", () => {1054 assert.throws(SyntaxError, () => { parseScript("\u2E2F"); });1055 });...

Full Screen

Full Screen

templateList.js

Source:templateList.js Github

copy

Full Screen

1export const testLocalData = [2 {3 "templateId": "781636836_a8f223",4 "templateVersion": 1,5 "templateLiteral": "Cannot statfs /run/containerd/io.containerd.runtime.<<<ALPHANUMERICAL_0>>>.task/<<<ALPHANUMERICAL_1>>>.io/<<<SEQ>>>/rootfs : Permission denied",6 "totalTemplates": 4455108907 },8 {9 "templateId": "281642282_0802cb",10 "templateVersion": 1,11 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~projected/<<<ALPHANUMERIC_CHAIN_THREE>>>-<<<ALPHANUMERICAL>>>: Permission denied",12 "totalTemplates": 12338442413 },14 {15 "templateId": "872429730_c13415",16 "templateVersion": 1,17 "templateLiteral": "<<<ALPHANUMERICAL>>> <<<TIMESTAMP>>><<<NUM+_0>>> <<<NUM+_1>>> kubelet_volumes.go : <<<NUM+_2>>>]There were many similar errors. Turn up verbosity to see them err = <<<ERR>>><<<ALPHANUMERIC_CHAIN_FIVE>>> found , but error not a directory occurred when trying to remove the volumes di numErrs = <<<NUM_ERRS>>>",18 "totalTemplates": 1751298919 },20 {21 "templateId": "458784822_d6b1f2",22 "templateVersion": 1,23 "templateLiteral": "audit : type = <<<TYPE>>> audit(<<<NUM+_0>>>:<<<NUM+_1>>>): apparmor = <<<APPARMOR>>> operation = <<<OPERATION>>> profile = <<<PROFILE>>> name = <<<NAME>>> pid = <<<PID>>> comm = <<<COMM>>> requested_mask = <<<REQUESTED_MASK>>> denied_mask = <<<DENIED_MASK>>> fsuid = <<<FSUID>>> ouid = <<<OUID>>>",24 "totalTemplates": 1592865325 },26 {27 "templateId": "2032424095_0d8f3c",28 "templateVersion": 1,29 "templateLiteral": "Cannot statfs /var/lib/kubelet/plugins/kubernetes.io/csi/pv/<<<ALPHANUMERIC_CHAIN_SIX_OR_BIGGER_0>>>/globalmount/<<<ALPHANUMERIC_CHAIN_SIX_OR_BIGGER_1>>>: Permission denied",30 "totalTemplates": 1237356631 },32 {33 "templateId": "680562337_c1eb1b",34 "templateVersion": 1,35 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~csi/<<<ALPHANUMERIC_CHAIN_SIX_OR_BIGGER>>>/mount : Permission denied",36 "totalTemplates": 1230453437 },38 {39 "templateId": "1656831631_a24cc2",40 "templateVersion": 1,41 "templateLiteral": "<<<ALPHANUMERIC_CHAIN_THREE_0>>>-<<<ALPHANUMERICAL_0>>>.<<<ALPHANUMERIC_CHAIN_THREE_1>>>.<<<ALPHANUMERICAL_1>>>.mount : Succeeded.",42 "totalTemplates": 1044205243 },44 {45 "templateId": "434775201_fe9c60",46 "templateVersion": 1,47 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~secret/<<<ALPHANUMERIC_CHAIN_TWO>>>: Permission denied",48 "totalTemplates": 555510849 },50 {51 "templateId": "377130823_f01e81",52 "templateVersion": 1,53 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~nfs/<<<ALPHANUMERIC_CHAIN_SIX_OR_BIGGER>>>: Permission denied",54 "totalTemplates": 543502655 },56 {57 "templateId": "1150672910_97344a",58 "templateVersion": 1,59 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL_0>>> <<<NUM+_1>>> mon.<<<ALPHANUMERICAL_1>>>@<<<NUM+_2>>>(peon).osd <<<ALPHANUMERICAL_2>>> _set_new_cache_sizes cache_size : <<<CACHE_SIZE>>> inc_alloc : <<<INC_ALLOC>>> full_alloc : <<<FULL_ALLOC>>> kv_alloc : <<<KV_ALLOC>>>",60 "totalTemplates": 536968461 },62 {63 "templateId": "1207760925_3bd6ba",64 "templateVersion": 1,65 "templateLiteral": "Processing configuration file '/etc/<<<ALPHANUMERIC_CHAIN_TWO>>>/users.xml'.",66 "totalTemplates": 518879867 },68 {69 "templateId": "845997534_dc71d2",70 "templateVersion": 1,71 "templateLiteral": "Merging configuration file '/etc/<<<ALPHANUMERIC_CHAIN_TWO_0>>>/users.d/<<<ALPHANUMERIC_CHAIN_TWO_1>>>.xml'.",72 "totalTemplates": 518844073 },74 {75 "templateId": "1049039941_e3824b",76 "templateVersion": 1,77 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~<<<ALPHANUMERIC_CHAIN_TWO>>>/<<<ALPHANUMERIC_CHAIN_THREE>>>: Permission denied",78 "totalTemplates": 487332879 },80 {81 "templateId": "2018216277_fcd9e3",82 "templateVersion": 1,83 "templateLiteral": "pam_unix(sudo : session): session closed for user root",84 "totalTemplates": 472155685 },86 {87 "templateId": "1102703364_161153",88 "templateVersion": 1,89 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/<<<ALPHANUMERIC_CHAIN_TWO>>>/scripts/kafka/<<<NUM+_0>>>: Permission denied",90 "totalTemplates": 390499291 },92 {93 "templateId": "1339908408_af94bf",94 "templateVersion": 3,95 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.rmfhey (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> TiB used , <<<NUM+_7>>> <<<$>>> / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> MiB/s wr , <<<NUM+_11>>> op/s",96 "totalTemplates": 346362397 },98 {99 "templateId": "701117705_e644f4",100 "templateVersion": 2,101 "templateLiteral": "pam_unix(sudo : session): session opened for user root by <<<$>>> = <<<UID>>>)",102 "totalTemplates": 3344452103 },104 {105 "templateId": "1831852558_9fa797",106 "templateVersion": 1,107 "templateLiteral": "Connection from UDP : [<<<IPVFOUR_0>>>]:<<<NUM+_0>>>->[<<<IPVFOUR_1>>>]:<<<NUM+_1>>>",108 "totalTemplates": 2956698109 },110 {111 "templateId": "1016590870_16ace0",112 "templateVersion": 1,113 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/<<<ALPHANUMERIC_CHAIN_TWO>>>/scripts/zookeeper/<<<NUM+_0>>>: Permission denied",114 "totalTemplates": 2933420115 },116 {117 "templateId": "2115048282_d0ea20",118 "templateVersion": 1,119 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/<<<ALPHANUMERIC_CHAIN_TWO_0>>>/scripts/<<<ALPHANUMERIC_CHAIN_TWO_1>>>/<<<NUM+_0>>>: Permission denied",120 "totalTemplates": 2907832121 },122 {123 "templateId": "436386931_86fd3d",124 "templateVersion": 1,125 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~<<<ALPHANUMERIC_CHAIN_TWO_0>>>/<<<ALPHANUMERIC_CHAIN_TWO_1>>>: Permission denied",126 "totalTemplates": 2435972127 },128 {129 "templateId": "1186227848_60bbb0",130 "templateVersion": 1,131 "templateLiteral": "root : TTY = <<<TTY>>> ; PWD = / ; USER = <<<USER>>> ; COMMAND = /usr/bin/systemctl status <<<ALPHANUMERIC_CHAIN_TWO>>>",132 "totalTemplates": 2359614133 },134 {135 "templateId": "684744679_69bfd8",136 "templateVersion": 1,137 "templateLiteral": "root : TTY = <<<TTY>>> ; PWD = / ; USER = <<<USER>>> ; COMMAND = /usr/bin/networkctl status <<<ALPHANUMERICAL>>>",138 "totalTemplates": 2359554139 },140 {141 "templateId": "712736392_680795",142 "templateVersion": 4,143 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.rmfhey (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> <<<$>>> used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> <<<$>>> wr , <<<NUM+_11>>> op/s",144 "totalTemplates": 1564460145 },146 {147 "templateId": "943429742_97ab2c",148 "templateVersion": 1,149 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~nfs/<<<ALPHANUMERIC_CHAIN_TWO>>>: Permission denied",150 "totalTemplates": 1405707151 },152 {153 "templateId": "712736392_680795",154 "templateVersion": 3,155 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.rmfhey (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> GiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> <<<$>>> wr , <<<NUM+_11>>> op/s",156 "totalTemplates": 1379094157 },158 {159 "templateId": "2030205593_c883c1",160 "templateVersion": 1,161 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL_0>>> <<<NUM+_1>>> mon.<<<ALPHANUMERICAL_1>>>@<<<NUM+_2>>>(leader).osd <<<ALPHANUMERICAL_2>>> _set_new_cache_sizes cache_size : <<<CACHE_SIZE>>> inc_alloc : <<<INC_ALLOC>>> full_alloc : <<<FULL_ALLOC>>> kv_alloc : <<<KV_ALLOC>>>",162 "totalTemplates": 1342264163 },164 {165 "templateId": "2073106581_042cf5",166 "templateVersion": 1,167 "templateLiteral": "<<<IPVSIX>>>:<<<IPVFOUR>>> - - [<<<TIMESTAMP>>>] GET /metrics HTTP/<<<NUM+_0>>> <<<NUM+_1>>> Prometheus/<<<NUM+_2>>>.<<<NUM+_3>>>",168 "totalTemplates": 1332104169 },170 {171 "templateId": "164649647_5d9f76",172 "templateVersion": 1,173 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/volumes/kubernetes.io~projected/<<<ALPHANUMERIC_CHAIN_TWO>>>: Permission denied",174 "totalTemplates": 1311420175 },176 {177 "templateId": "1600955875_bc1ae5",178 "templateVersion": 1,179 "templateLiteral": "Cannot statfs /var/lib/docker/<<<ALPHANUMERICAL>>>/<<<SEQ>>>/merged : Permission denied",180 "totalTemplates": 1232452181 },182 {183 "templateId": "1491935507_fe8710",184 "templateVersion": 2,185 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.rmfhey (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> GiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> wr , <<<NUM+_10>>> op/s",186 "totalTemplates": 1144349187 },188 {189 "templateId": "1617491851_35a74c",190 "templateVersion": 3,191 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.mfnejn (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> GiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> <<<$>>> wr , <<<NUM+_11>>> op/s",192 "totalTemplates": 982487193 },194 {195 "templateId": "2112862910_b4a67f",196 "templateVersion": 3,197 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL_0>>> <<<NUM+_1>>> log_channel(cluster) log [DBG] : pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_2>>> pgs : <<<PGS>>> active+clean; <<<NUM+_3>>> GiB data , <<<NUM+_4>>> GiB used , <<<NUM+_5>>> TiB / <<<NUM+_6>>> TiB avail; <<<NUM+_7>>> <<<$>>> rd , <<<NUM+_8>>> <<<$>>> wr , <<<NUM+_9>>> op/s",198 "totalTemplates": 977354199 },200 {201 "templateId": "2005660624_776daf",202 "templateVersion": 1,203 "templateLiteral": "message repeated <<<NUM+_0>>> times : [ Connection from UDP : [<<<IPVFOUR_0>>>]:<<<NUM+_1>>>->[<<<IPVFOUR_1>>>]:<<<NUM+_2>>>]",204 "totalTemplates": 844094205 },206 {207 "templateId": "2065086320_f1267f",208 "templateVersion": 2,209 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.mfnejn (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> GiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> wr , <<<NUM+_10>>> op/s",210 "totalTemplates": 828551211 },212 {213 "templateId": "1652196841_a11352",214 "templateVersion": 1,215 "templateLiteral": "GSSAPI client step <<<NUM+_0>>>",216 "totalTemplates": 778377217 },218 {219 "templateId": "60218110_15dad4",220 "templateVersion": 3,221 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL_0>>> <<<NUM+_1>>> log_channel(cluster) log [DBG] : pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_2>>> pgs : <<<PGS>>> active+clean; <<<NUM+_3>>> GiB data , <<<NUM+_4>>> TiB used , <<<NUM+_5>>> <<<$>>> / <<<NUM+_6>>> TiB avail; <<<NUM+_7>>> <<<$>>> rd , <<<NUM+_8>>> MiB/s wr , <<<NUM+_9>>> op/s",222 "totalTemplates": 769628223 },224 {225 "templateId": "653409461_5ff0e3",226 "templateVersion": 2,227 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.rmfhey (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> TiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> MiB/s wr , <<<NUM+_11>>> op/s",228 "totalTemplates": 760610229 },230 {231 "templateId": "1899574175_ead137",232 "templateVersion": 1,233 "templateLiteral": "<<<ALPHANUMERICAL>>> <<<TIMESTAMP>>><<<NUM+_0>>> <<<NUM+_1>>> scope.go : <<<NUM+_2>>>] RemoveContainer containerID = <<<CONTAINER_ID>>>",234 "totalTemplates": 727848235 },236 {237 "templateId": "2093676025_9c0748",238 "templateVersion": 2,239 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.mfnejn (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> GiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> MiB/s wr , <<<NUM+_11>>> op/s",240 "totalTemplates": 700501241 },242 {243 "templateId": "1605190189_ff45ff",244 "templateVersion": 1,245 "templateLiteral": "<<<IPVSIX>>>:<<<IPVFOUR>>> - - [<<<TIMESTAMP>>>] GET /metrics HTTP/<<<NUM+_0>>> <<<NUM+_1>>> <<<NUM+_2>>> Prometheus/<<<NUM+_3>>>.<<<NUM+_4>>>",246 "totalTemplates": 671381247 },248 {249 "templateId": "2059063843_dc9570",250 "templateVersion": 2,251 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL_0>>> <<<NUM+_1>>> log_channel(cluster) log [DBG] : pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_2>>> pgs : <<<PGS>>> active+clean; <<<NUM+_3>>> GiB data , <<<NUM+_4>>> GiB used , <<<NUM+_5>>> TiB / <<<NUM+_6>>> TiB avail; <<<NUM+_7>>> <<<$>>> wr , <<<NUM+_8>>> op/s",252 "totalTemplates": 657630253 },254 {255 "templateId": "190619235_234b89",256 "templateVersion": 2,257 "templateLiteral": "pam_unix(sudo : session): session opened for user root by <<<$>>> = <<<UID>>>)",258 "totalTemplates": 617080259 },260 {261 "templateId": "1036453716_00fe47",262 "templateVersion": 1,263 "templateLiteral": "[<<<TIMESTAMP>>>] INFO [Log partition = <<<PARTITION>>> , dir = /home/.<<<ALPHANUMERIC_CHAIN_TWO_0>>>/kafka/<<<ALPHANUMERIC_CHAIN_TWO_1>>>] Loading producer state till offset <<<NUM+_0>>> with message format version <<<NUM+_1>>> (kafka.log.Log)",264 "totalTemplates": 616792265 },266 {267 "templateId": "2086390580_5af56c",268 "templateVersion": 1,269 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL>>> <<<NUM+_1>>> rocksdb : <<<ROCKSDB>>> {time_micros: <<<SEQ>>> , cf_name: default , job: <<<NUM+_2>>> , event: table_file_creation , file_number: <<<NUM+_3>>> , file_size: <<<NUM+_4>>> , table_properties: {data_size: <<<NUM+_5>>> , index_size: <<<NUM+_6>>> , filter_size: <<<NUM+_7>>> , raw_key_size: <<<NUM+_8>>> , raw_average_key_size: <<<NUM+_9>>> , raw_value_size: <<<NUM+_10>>> , raw_average_value_size: <<<NUM+_11>>> , num_data_blocks: <<<NUM+_12>>> , num_entries: <<<NUM+_13>>> , filter_policy_name: rocksdb.BuiltinBloomFilter}}",270 "totalTemplates": 613671271 },272 {273 "templateId": "1751058283_79fc2a",274 "templateVersion": 1,275 "templateLiteral": "debug <<<TIMESTAMP>>>+<<<NUM+_0>>> <<<ALPHANUMERICAL>>> <<<NUM+_1>>> rocksdb : <<<ROCKSDB>>> {time_micros: <<<SEQ>>> , job: <<<NUM+_2>>> , event: table_file_deletion , file_number: <<<NUM+_3>>>}",276 "totalTemplates": 613633277 },278 {279 "templateId": "654532651_d25431",280 "templateVersion": 1,281 "templateLiteral": "error on subcontainer 'ia_addr' insert (<<<NUM+_0>>>)",282 "totalTemplates": 588038283 },284 {285 "templateId": "197516627_759ebc",286 "templateVersion": 1,287 "templateLiteral": "message repeated <<<NUM+_0>>> times : [ error on subcontainer 'ia_addr' insert (<<<NUM+_1>>>)]",288 "totalTemplates": 587992289 },290 {291 "templateId": "1940439108_4ca051",292 "templateVersion": 1,293 "templateLiteral": "Cannot statfs /var/lib/kubelet/pods/<<<ALPHANUMERIC_CHAIN_FIVE>>>/<<<ALPHANUMERIC_CHAIN_TWO>>>/config/filebeat/<<<NUM+_0>>>: Permission denied",294 "totalTemplates": 583983295 },296 {297 "templateId": "2072569016_76e7ce",298 "templateVersion": 3,299 "templateLiteral": "cluster <<<TIMESTAMP>>><<<NUM+_0>>>+<<<NUM+_1>>> mgr.<<<ALPHANUMERICAL_0>>>.rmfhey (mgr.<<<NUM+_2>>>) <<<NUM+_3>>> : cluster [DBG] pgmap <<<ALPHANUMERICAL_1>>>: <<<NUM+_4>>> pgs : <<<PGS>>> active+clean; <<<NUM+_5>>> GiB data , <<<NUM+_6>>> GiB used , <<<NUM+_7>>> TiB / <<<NUM+_8>>> TiB avail; <<<NUM+_9>>> <<<$>>> rd , <<<NUM+_10>>> <<<$>>> wr , <<<NUM+_11>>> op/s",300 "totalTemplates": 570403301 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var strykerChild = require('stryker-child');3var strykerChildObj = new strykerChild();4var strykerParentObj = new strykerParent();5var templateLiteral = strykerParentObj.templateLiteral();6console.log(templateLiteral);7console.log(strykerChildObj.templateLiteral());8var strykerParent = function () {9 this.templateLiteral = function () {10 return `This is template literal`;11 }12}13module.exports = strykerParent;14var strykerChild = function () {15 this.templateLiteral = function () {16 return `This is template literal from child`;17 }18}19module.exports = strykerChild;20{21 "scripts": {22 },23}24{25 "scripts": {26 },27 "dependencies": {28 }29}30{31 "scripts": {32 },33 "dependencies": {34 }35}36{37 "commandRunner": {38 },

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var stryker = strykerParent.templateLiteral();3console.log(stryker);4var strykerParent = require('stryker-parent');5var stryker = strykerParent.templateLiteral();6console.log(stryker);7var strykerParent = require('stryker-parent');8var stryker = strykerParent.templateLiteral();9console.log(stryker);10var strykerParent = require('stryker-parent');11var stryker = strykerParent.templateLiteral();12console.log(stryker);13var strykerParent = require('stryker-parent');14var stryker = strykerParent.templateLiteral();15console.log(stryker);16var strykerParent = require('stryker-parent');17var stryker = strykerParent.templateLiteral();18console.log(stryker);19var strykerParent = require('stryker-parent');20var stryker = strykerParent.templateLiteral();21console.log(stryker);22var strykerParent = require('stryker-parent');23var stryker = strykerParent.templateLiteral();24console.log(stryker);25var strykerParent = require('stryker-parent');26var stryker = strykerParent.templateLiteral();27console.log(stryker);28var strykerParent = require('stryker-parent');29var stryker = strykerParent.templateLiteral();30console.log(stryker);31var strykerParent = require('stry

Full Screen

Using AI Code Generation

copy

Full Screen

1const strykerParent = require('stryker-parent');2console.log(strykerParent.templateLiteral('foo', 'bar'));3const strykerParent = require('stryker-parent');4console.log(strykerParent.templateLiteral('foo', 'bar'));5const strykerParent = require('stryker-parent');6console.log(strykerParent.templateLiteral('foo', 'bar'));7const strykerParent = require('stryker-parent');8console.log(strykerParent.templateLiteral('foo', 'bar'));9const strykerParent = require('stryker-parent');10console.log(strykerParent.templateLiteral('foo', 'bar'));11const strykerParent = require('stryker-parent');12console.log(strykerParent.templateLiteral('foo', 'bar'));13const strykerParent = require('stryker-parent');14console.log(strykerParent.templateLiteral('foo', 'bar'));15const strykerParent = require('stryker-parent');16console.log(strykerParent.templateLiteral('foo', 'bar'));17const strykerParent = require('stryker-parent');18console.log(strykerParent.templateLiteral('foo', 'bar'));19const strykerParent = require('stryker-parent');20console.log(strykerParent.templateLiteral('foo', 'bar'));

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2console.log(strykerParent.templateLiteral('Hello', 'World!'));3module.exports = {4 templateLiteral: function (first, second) {5 return `${first} ${second}`;6 }7};

Full Screen

Using AI Code Generation

copy

Full Screen

1const templateLiteral = require('stryker-parent').templateLiteral;2const result = templateLiteral('Hello', 'World');3const { templateLiteral } = require('stryker-parent');4const result = templateLiteral('Hello', 'World');5const strykerParent = require('stryker-parent');6const result = strykerParent.templateLiteral('Hello', 'World');7const strykerParent = require('stryker-parent');8const { templateLiteral } = strykerParent;9const result = templateLiteral('Hello', 'World');10const strykerParent = require('stryker-parent');11const result = strykerParent.templateLiteral('Hello', 'World');12const strykerParent = require('stryker-parent');13const { templateLiteral } = strykerParent;14const result = templateLiteral('Hello', 'World');15const strykerParent = require('stryker-parent');16const result = strykerParent.templateLiteral('Hello', 'World');17const strykerParent = require('stryker-parent');18const { templateLiteral } = strykerParent;19const result = templateLiteral('Hello', 'World');20const strykerParent = require('stryker-parent');21const result = strykerParent.templateLiteral('Hello', 'World');

Full Screen

Using AI Code Generation

copy

Full Screen

1const templateLiteral = require('stryker-parent').templateLiteral;2const str = templateLiteral('Hello ${name}!', {name: 'World'});3console.log(str);4{5 "dependencies": {6 }7}8{9}10module.exports = {11 templateLiteral: (str, obj) => {12 return str.replace(/\${([^}]+)}/g, (match, key) => obj[key]);13 }14};

Full Screen

Using AI Code Generation

copy

Full Screen

1var templateLiteral = require('stryker-parent').templateLiteral;2var template = templateLiteral('Hello ${name}');3console.log(template({ name: 'World' }));4module.exports = {5 templateLiteral: function (template) {6 return function (data) {7 return template.replace(/\${([^}]+)}/g, function (match, key) {8 return data[key];9 });10 };11 }12};13{14}15var templateLiteral = require('./index').templateLiteral;16var template = templateLiteral('Hello ${name}');17console.log(template({ name: 'World' }));18var templateLiteral = require('stryker-parent').templateLiteral;

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful