UNPKG

4.21 kBSource Map (JSON)View Raw
1{"version":3,"file":"NodeParserCode.test.js","sourceRoot":"","sources":["../../../src/parser/__tests__/NodeParserCode.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,IAAI,CAAC,8BAA8B,EAAE;IACnC,WAAW,CAAC,+BAA+B,CAAC,CAAC,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1G,WAAW,CAAC,+BAA+B,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,8BAA8B,EAAE;IACnC,WAAW,CAAC,+BAA+B,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChG,WAAW,CAAC,+BAA+B,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,yBAAyB,EAAE;IAC9B,WAAW,CAAC,+BAA+B,CACzC;QACE,KAAK;QACL,yCAAyC;QACzC,sBAAsB;QACtB,uBAAuB;QACvB,WAAW;QACX,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC;QACE,KAAK;QACL,kEAAkE;QAClE,QAAQ;QACR,uBAAuB;QACvB,UAAU;KACX,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,yBAAyB,EAAE;IAC9B,WAAW,CAAC,+BAA+B,CACzC,CAAC,KAAK,EAAE,qCAAqC,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC9E,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC,CAAC,KAAK,EAAE,sCAAsC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5E,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC,CAAC,KAAK,EAAE,uCAAuC,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACxE,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC,CAAC,KAAK,EAAE,uCAAuC,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACxF,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC,CAAC,KAAK,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACpF,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC,CAAC,KAAK,EAAE,sCAAsC,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACtG,CAAC;IACF,WAAW,CAAC,+BAA+B,CACzC;QACE,KAAK;QACL,qDAAqD;QACrD,QAAQ;QACR,SAAS;QACT,WAAW;QACX,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { TestHelpers } from './TestHelpers';\r\n\r\ntest('00 Code span basic, positive', () => {\r\n TestHelpers.parseAndMatchNodeParserSnapshot(['/**', ' * line `1`', ' * line ` 2` sdf', ' */'].join('\\n'));\r\n TestHelpers.parseAndMatchNodeParserSnapshot(['/**', ' * M`&`M', ' */'].join('\\n'));\r\n});\r\n\r\ntest('01 Code span basic, negative', () => {\r\n TestHelpers.parseAndMatchNodeParserSnapshot(['/**', ' * `multi', ' * line`', ' */'].join('\\n'));\r\n TestHelpers.parseAndMatchNodeParserSnapshot(['/**', ' * ``', ' */'].join('\\n'));\r\n});\r\n\r\ntest('03 Code fence, positive', () => {\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n [\r\n '/**',\r\n ' * This is a code fence with all parts:',\r\n ' * ```a language! ',\r\n ' * some `code` here',\r\n ' * ``` ',\r\n ' */'\r\n ].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n [\r\n '/**',\r\n ' * This is a code fence with no language or trailing whitespace:',\r\n ' * ```',\r\n ' * some `code` here',\r\n ' * ```*/'\r\n ].join('\\n')\r\n );\r\n});\r\n\r\ntest('04 Code fence, negative', () => {\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n ['/**', ' * Code fence incorrectly indented:', ' * ```', ' */'].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n ['/**', ' * Code fence not starting the line:', ' *a```', ' */'].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n ['/**', ' * Code fence not being terminated 1:', ' * ```*/'].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n ['/**', ' * Code fence not being terminated 2:', ' * ``` some stuff', ' */'].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n ['/**', ' * Language having backticks:', ' * ``` some stuff ```', ' */'].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n ['/**', ' * Closing delimiter being indented:', ' * ```', ' * code', ' * ```', ' */'].join('\\n')\r\n );\r\n TestHelpers.parseAndMatchNodeParserSnapshot(\r\n [\r\n '/**',\r\n ' * Closing delimiter not being on a line by itself:',\r\n ' * ```',\r\n ' * code',\r\n ' * ``` a',\r\n ' */'\r\n ].join('\\n')\r\n );\r\n});\r\n"]}
\No newline at end of file