From bbbf21cbccb6a372db6d48e29d30576abcd0ee21 Mon Sep 17 00:00:00 2001 From: Frederic Barthelemy Date: Tue, 16 May 2023 12:52:03 -0700 Subject: [PATCH] Push up failing test for #87 --- .../__snapshots__/ppsi.spec.ts.snap | 26 +++++++++++++++++++ .../import-comments-should-not-duplicate.ts | 11 ++++++++ tests/ImportCommentsNoDuplicate/ppsi.spec.ts | 5 ++++ 3 files changed, 42 insertions(+) create mode 100644 tests/ImportCommentsNoDuplicate/__snapshots__/ppsi.spec.ts.snap create mode 100644 tests/ImportCommentsNoDuplicate/import-comments-should-not-duplicate.ts create mode 100644 tests/ImportCommentsNoDuplicate/ppsi.spec.ts diff --git a/tests/ImportCommentsNoDuplicate/__snapshots__/ppsi.spec.ts.snap b/tests/ImportCommentsNoDuplicate/__snapshots__/ppsi.spec.ts.snap new file mode 100644 index 0000000..e46dddf --- /dev/null +++ b/tests/ImportCommentsNoDuplicate/__snapshots__/ppsi.spec.ts.snap @@ -0,0 +1,26 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`import-comments-should-not-duplicate.ts - typescript-verify > import-comments-should-not-duplicate.ts 1`] = ` +#!/usr/bin/env ts-node +// ################################################ +// ## Highlander comment: There can only be one! ## +// ################################################ + +const someRandomGlobal = "stuff"; + +import * as fs from "fs"; +import * as path from "path"; +import shell from "shelljs"; + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +#!/usr/bin/env ts-node +// ################################################ +// ## Highlander comment: There can only be one! ## +// ################################################ +import * as fs from "fs"; +import * as path from "path"; +import shell from "shelljs"; + +const someRandomGlobal = "stuff"; + +`; diff --git a/tests/ImportCommentsNoDuplicate/import-comments-should-not-duplicate.ts b/tests/ImportCommentsNoDuplicate/import-comments-should-not-duplicate.ts new file mode 100644 index 0000000..2de7b97 --- /dev/null +++ b/tests/ImportCommentsNoDuplicate/import-comments-should-not-duplicate.ts @@ -0,0 +1,11 @@ +#!/usr/bin/env ts-node +// ################################################ +// ## Highlander comment: There can only be one! ## +// ################################################ + +const someRandomGlobal = "stuff"; + +import * as fs from "fs"; +import * as path from "path"; +import shell from "shelljs"; + diff --git a/tests/ImportCommentsNoDuplicate/ppsi.spec.ts b/tests/ImportCommentsNoDuplicate/ppsi.spec.ts new file mode 100644 index 0000000..24ee86b --- /dev/null +++ b/tests/ImportCommentsNoDuplicate/ppsi.spec.ts @@ -0,0 +1,5 @@ +import {run_spec} from '../../test-setup/run_spec'; + +run_spec(__dirname, ["typescript"], { + importOrderParserPlugins : ['typescript'] +});