From d38ea52debdf9da718c60933f42a709fa05f550f Mon Sep 17 00:00:00 2001 From: Ben Scott Date: Wed, 26 Sep 2018 21:47:21 -0700 Subject: [PATCH] Chore: Rename test files to keep them sequential --- test/invalid/12.txt | 18 ++++++++++++++++++ test/invalid/13.txt | 11 ++++++++--- test/invalid/14.txt | 15 ++++----------- test/invalid/15.txt | 9 ++++----- test/invalid/16.txt | 6 +++--- test/invalid/17.txt | 6 ++++-- test/invalid/18.txt | 17 ----------------- test/prettier.js | 4 ++-- 8 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 test/invalid/12.txt delete mode 100644 test/invalid/18.txt diff --git a/test/invalid/12.txt b/test/invalid/12.txt new file mode 100644 index 00000000..6b07ceb0 --- /dev/null +++ b/test/invalid/12.txt @@ -0,0 +1,18 @@ +CODE: +var foo ='';var bar ='';var baz =''; + +OUTPUT: +var foo = ""; +var bar = ""; +var baz = ""; + +OPTIONS: +[] + +ERRORS: +[ + { + message: 'Replace `\'\';var·bar·=\'\';var·baz·=\'\'` with `·"";⏎var·bar·=·"";⏎var·baz·=·""`', + line: 1, column: 10, endLine: 1, endColumn: 36, + }, +] diff --git a/test/invalid/13.txt b/test/invalid/13.txt index 6b07ceb0..5e38ab98 100644 --- a/test/invalid/13.txt +++ b/test/invalid/13.txt @@ -1,5 +1,6 @@ CODE: -var foo ='';var bar ='';var baz =''; +var foo ='';var bar =''; +var baz =''; OUTPUT: var foo = ""; @@ -12,7 +13,11 @@ OPTIONS: ERRORS: [ { - message: 'Replace `\'\';var·bar·=\'\';var·baz·=\'\'` with `·"";⏎var·bar·=·"";⏎var·baz·=·""`', - line: 1, column: 10, endLine: 1, endColumn: 36, + message: 'Replace `\'\';var·bar·=\'\'` with `·"";⏎var·bar·=·""`', + line: 1, column: 10, endLine: 1, endColumn: 24, + }, + { + message: 'Replace `\'\'` with `·""`', + line: 2, column: 10, endLine: 2, endColumn: 12, }, ] diff --git a/test/invalid/14.txt b/test/invalid/14.txt index 5e38ab98..48ce7d30 100644 --- a/test/invalid/14.txt +++ b/test/invalid/14.txt @@ -1,11 +1,8 @@ CODE: -var foo ='';var bar =''; -var baz =''; +var foo = { "bar": "", "baz": "" }; OUTPUT: -var foo = ""; -var bar = ""; -var baz = ""; +var foo = { bar: "", baz: "" }; OPTIONS: [] @@ -13,11 +10,7 @@ OPTIONS: ERRORS: [ { - message: 'Replace `\'\';var·bar·=\'\'` with `·"";⏎var·bar·=·""`', - line: 1, column: 10, endLine: 1, endColumn: 24, - }, - { - message: 'Replace `\'\'` with `·""`', - line: 2, column: 10, endLine: 2, endColumn: 12, + message: 'Replace `"bar":·"",·"baz"` with `bar:·"",·baz`', + line: 1, column: 13, endLine: 1, endColumn: 29, }, ] diff --git a/test/invalid/15.txt b/test/invalid/15.txt index 48ce7d30..e4b1d416 100644 --- a/test/invalid/15.txt +++ b/test/invalid/15.txt @@ -1,8 +1,7 @@ CODE: -var foo = { "bar": "", "baz": "" }; - +var foo = '' OUTPUT: -var foo = { bar: "", baz: "" }; +var foo = ""; OPTIONS: [] @@ -10,7 +9,7 @@ OPTIONS: ERRORS: [ { - message: 'Replace `"bar":·"",·"baz"` with `bar:·"",·baz`', - line: 1, column: 13, endLine: 1, endColumn: 29, + message: 'Replace `\'\'` with `"";⏎`', + line: 1, column: 11, endLine: 1, endColumn: 13, }, ] diff --git a/test/invalid/16.txt b/test/invalid/16.txt index e4b1d416..889f570f 100644 --- a/test/invalid/16.txt +++ b/test/invalid/16.txt @@ -1,5 +1,5 @@ CODE: -var foo = '' +var foo = ""; OUTPUT: var foo = ""; @@ -9,7 +9,7 @@ OPTIONS: ERRORS: [ { - message: 'Replace `\'\'` with `"";⏎`', - line: 1, column: 11, endLine: 1, endColumn: 13, + message: 'Insert `⏎`', + line: 1, column: 14, endLine: 1, endColumn: 14, }, ] diff --git a/test/invalid/17.txt b/test/invalid/17.txt index 889f570f..1595da21 100644 --- a/test/invalid/17.txt +++ b/test/invalid/17.txt @@ -1,5 +1,7 @@ CODE: + var foo = ""; + OUTPUT: var foo = ""; @@ -9,7 +11,7 @@ OPTIONS: ERRORS: [ { - message: 'Insert `⏎`', - line: 1, column: 14, endLine: 1, endColumn: 14, + message: 'Delete `⏎`', + line: 1, column: 1, endLine: 2, endColumn: 1, }, ] diff --git a/test/invalid/18.txt b/test/invalid/18.txt deleted file mode 100644 index 1595da21..00000000 --- a/test/invalid/18.txt +++ /dev/null @@ -1,17 +0,0 @@ -CODE: - -var foo = ""; - -OUTPUT: -var foo = ""; - -OPTIONS: -[] - -ERRORS: -[ - { - message: 'Delete `⏎`', - line: 1, column: 1, endLine: 2, endColumn: 1, - }, -] diff --git a/test/prettier.js b/test/prettier.js index 060c3cfd..106469fb 100644 --- a/test/prettier.js +++ b/test/prettier.js @@ -85,12 +85,12 @@ ruleTester.run('prettier', rule, { '10', '11-a', '11-b', + '12', '13', '14', '15', '16', - '17', - '18' + '17' ].map(loadInvalidFixture) });