From 3dff757927852aff3110e72934f891f029bb8a8d Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Fri, 13 Aug 2021 02:10:14 +0800 Subject: fix(cli): allow specifiers of unknown media types with test command (#11652) --- cli/tests/testdata/test/doc_markdown.out | 7 ------- cli/tests/testdata/test/doc_markdown/doc.md | 25 ------------------------- cli/tests/testdata/test/markdown.md | 25 +++++++++++++++++++++++++ cli/tests/testdata/test/markdown.out | 7 +++++++ cli/tests/testdata/test/text.md | 1 + cli/tests/testdata/test/text.out | 4 ++++ 6 files changed, 37 insertions(+), 32 deletions(-) delete mode 100644 cli/tests/testdata/test/doc_markdown.out delete mode 100644 cli/tests/testdata/test/doc_markdown/doc.md create mode 100644 cli/tests/testdata/test/markdown.md create mode 100644 cli/tests/testdata/test/markdown.out create mode 100644 cli/tests/testdata/test/text.md create mode 100644 cli/tests/testdata/test/text.out (limited to 'cli/tests/testdata') diff --git a/cli/tests/testdata/test/doc_markdown.out b/cli/tests/testdata/test/doc_markdown.out deleted file mode 100644 index 9d2c35974..000000000 --- a/cli/tests/testdata/test/doc_markdown.out +++ /dev/null @@ -1,7 +0,0 @@ -Check [WILDCARD]/test/doc_markdown/doc.md$11-14.js -Check [WILDCARD]/test/doc_markdown/doc.md$17-20.ts -Check [WILDCARD]/test/doc_markdown/doc.md$23-26.ts -error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 42; - ^ - at [WILDCARD]/test/doc_markdown/doc.md$23-26.ts:1:7 diff --git a/cli/tests/testdata/test/doc_markdown/doc.md b/cli/tests/testdata/test/doc_markdown/doc.md deleted file mode 100644 index e5afb841b..000000000 --- a/cli/tests/testdata/test/doc_markdown/doc.md +++ /dev/null @@ -1,25 +0,0 @@ -# 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 will trigger the type-checker to fail: - -```ts -const a: string = 42; -``` diff --git a/cli/tests/testdata/test/markdown.md b/cli/tests/testdata/test/markdown.md new file mode 100644 index 000000000..e5afb841b --- /dev/null +++ b/cli/tests/testdata/test/markdown.md @@ -0,0 +1,25 @@ +# 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 will trigger the type-checker to fail: + +```ts +const a: string = 42; +``` diff --git a/cli/tests/testdata/test/markdown.out b/cli/tests/testdata/test/markdown.out new file mode 100644 index 000000000..3f7bc7366 --- /dev/null +++ b/cli/tests/testdata/test/markdown.out @@ -0,0 +1,7 @@ +Check [WILDCARD]/test/markdown.md$11-14.js +Check [WILDCARD]/test/markdown.md$17-20.ts +Check [WILDCARD]/test/markdown.md$23-26.ts +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const a: string = 42; + ^ + at [WILDCARD]/test/markdown.md$23-26.ts:1:7 diff --git a/cli/tests/testdata/test/text.md b/cli/tests/testdata/test/text.md new file mode 100644 index 000000000..be89d24bf --- /dev/null +++ b/cli/tests/testdata/test/text.md @@ -0,0 +1 @@ +This fixture contains no actual tests. diff --git a/cli/tests/testdata/test/text.out b/cli/tests/testdata/test/text.out new file mode 100644 index 000000000..b09b04c05 --- /dev/null +++ b/cli/tests/testdata/test/text.out @@ -0,0 +1,4 @@ +running 0 tests from [WILDCARD]/test/text.md + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) + -- cgit v1.2.3