diff options
| author | Geert-Jan Zwiers <34610306+GJZwiers@users.noreply.github.com> | 2022-03-08 02:10:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-08 02:10:40 +0100 |
| commit | e53b6c16bc1d11f6791eb6f4f3d822150d36e278 (patch) | |
| tree | d50c513a242227b5b1df36411a2120b669ee4e39 /cli/tests/testdata | |
| parent | c1ff23b20e8accdec12ca3fe173a8a8463182a9c (diff) | |
fix(test): typecheck blocks annotated with long js/ts notations (#13785)
Diffstat (limited to 'cli/tests/testdata')
| -rw-r--r-- | cli/tests/testdata/test/markdown_full_block_names.md | 19 | ||||
| -rw-r--r-- | cli/tests/testdata/test/markdown_full_block_names.out | 6 |
2 files changed, 25 insertions, 0 deletions
diff --git a/cli/tests/testdata/test/markdown_full_block_names.md b/cli/tests/testdata/test/markdown_full_block_names.md new file mode 100644 index 000000000..4f9e1ea51 --- /dev/null +++ b/cli/tests/testdata/test/markdown_full_block_names.md @@ -0,0 +1,19 @@ +# Documentation + +The following block should be given a js extension on extraction: + +```javascript +console.log("js"); +``` + +The following example contains the ignore attribute and will be ignored: + +```typescript ignore +const value: Invalid = "ignored"; +``` + +The following example will trigger the type-checker to fail: + +```typescript +const a: string = 42; +``` diff --git a/cli/tests/testdata/test/markdown_full_block_names.out b/cli/tests/testdata/test/markdown_full_block_names.out new file mode 100644 index 000000000..13051112e --- /dev/null +++ b/cli/tests/testdata/test/markdown_full_block_names.out @@ -0,0 +1,6 @@ +Check [WILDCARD]/test/markdown_full_block_names.md$5-8.js +Check [WILDCARD]/test/markdown_full_block_names.md$17-20.ts +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const a: string = 42; + ^ + at [WILDCARD]/test/markdown_full_block_names.md$17-20.ts:1:7 |
