From 58e7b290dccbf06abb882daf2ae2b4c1df96f73f Mon Sep 17 00:00:00 2001 From: Geert-Jan Zwiers <34610306+GJZwiers@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:58:04 +0100 Subject: fix(test): support typechecking docs with CRLF line endings (#12748) --- cli/tests/testdata/test/markdown_windows.md | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 cli/tests/testdata/test/markdown_windows.md (limited to 'cli/tests/testdata/test/markdown_windows.md') diff --git a/cli/tests/testdata/test/markdown_windows.md b/cli/tests/testdata/test/markdown_windows.md new file mode 100644 index 000000000..d18dbd108 --- /dev/null +++ b/cli/tests/testdata/test/markdown_windows.md @@ -0,0 +1,31 @@ +# Documentation + +The following block does not have a language attribute and should be ignored: + +``` +This is a fenced block without attributes, it's invalid and it should be ignored. +``` + +The following block should be given a js extension on extraction: + +```js +console.log("js"); +``` + +The following block should be given a ts extension on extraction: + +```ts +console.log("ts"); +``` + +The following example contains the ignore attribute and will be ignored: + +```ts ignore +const value: Invalid = "ignored"; +``` + +The following example will trigger the type-checker to fail: + +```ts +const a: string = 42; +``` -- cgit v1.2.3