From 9a6815f3c7887c757cbe5a56dc6f6b4e67f6d2bc Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 27 Jan 2016 13:26:41 -0800 Subject: [PATCH] add tests --- tests/cases/fourslash/renameJsExports.ts | 12 ++++++++++++ tests/cases/fourslash/renameJsPrototypeProperty.ts | 12 ++++++++++++ tests/cases/fourslash/renameJsThisProperty.ts | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 tests/cases/fourslash/renameJsExports.ts create mode 100644 tests/cases/fourslash/renameJsPrototypeProperty.ts create mode 100644 tests/cases/fourslash/renameJsThisProperty.ts diff --git a/tests/cases/fourslash/renameJsExports.ts b/tests/cases/fourslash/renameJsExports.ts new file mode 100644 index 00000000000..227eebe4a0d --- /dev/null +++ b/tests/cases/fourslash/renameJsExports.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////exports.[|area|] = function (r) { return r * r; } + +// @Filename: b.js +////var mod = require('./a'); +////var t = mod./**/[|area|](10); + +goTo.marker(); +verify.renameLocations(false, false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsPrototypeProperty.ts b/tests/cases/fourslash/renameJsPrototypeProperty.ts new file mode 100644 index 00000000000..651514859cc --- /dev/null +++ b/tests/cases/fourslash/renameJsPrototypeProperty.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////function bar() { +////} +////bar.prototype.[|x|] = 10; +////var t = new bar(); +////t./**/[|x|] = 11; + +goTo.marker(); +verify.renameLocations(false, false); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsThisProperty.ts b/tests/cases/fourslash/renameJsThisProperty.ts new file mode 100644 index 00000000000..aed59d298b1 --- /dev/null +++ b/tests/cases/fourslash/renameJsThisProperty.ts @@ -0,0 +1,12 @@ +/// + +// @allowJs: true +// @Filename: a.js +////function bar() { +//// this.[|x|] = 10; +////} +////var t = new bar(); +////t./**/[|x|] = 11; + +goTo.marker(); +verify.renameLocations(false, false); \ No newline at end of file