summaryrefslogtreecommitdiff
path: root/test/test_fuzzy_json_decode.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-22 23:23:14 +0000
committerw0rp <devw0rp@gmail.com>2017-11-22 23:23:14 +0000
commit5160f814d929e0936c3d920087e0c4d16040ae9c (patch)
tree185d2cf775d027a29f23534a54415626608fbbbe /test/test_fuzzy_json_decode.vader
parent6318a08e08716d460f8441457813875495050023 (diff)
downloadale-5160f814d929e0936c3d920087e0c4d16040ae9c.zip
Fix #988 - Support --fix-dry-run for ESLint by processing the JSON output
Diffstat (limited to 'test/test_fuzzy_json_decode.vader')
-rw-r--r--test/test_fuzzy_json_decode.vader8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_fuzzy_json_decode.vader b/test/test_fuzzy_json_decode.vader
index 4ac0ca1b..4b1c6088 100644
--- a/test/test_fuzzy_json_decode.vader
+++ b/test/test_fuzzy_json_decode.vader
@@ -6,6 +6,14 @@ Execute(FuzzyJSONDecode should return the default for empty Strings):
AssertEqual [], ale#util#FuzzyJSONDecode('', [])
AssertEqual {}, ale#util#FuzzyJSONDecode('', {})
+Execute(FuzzyJSONDecode should return the default value for ['']):
+ AssertEqual [], ale#util#FuzzyJSONDecode([''], [])
+ AssertEqual {}, ale#util#FuzzyJSONDecode([''], {})
+
+Execute(FuzzyJSONDecode should return the default value for only whitespace lines):
+ AssertEqual [], ale#util#FuzzyJSONDecode(['', "\n"], [])
+ AssertEqual {}, ale#util#FuzzyJSONDecode(['', "\n"], {})
+
Execute(FuzzyJSONDecode should return the default for Lists with invalid JSON):
AssertEqual [], ale#util#FuzzyJSONDecode(['x'], [])
AssertEqual {}, ale#util#FuzzyJSONDecode(['x'], {})