Skip to content

Commit 81db867

Browse files
committed
Fix analysis test
1 parent 245a57f commit 81db867

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/analysis_tests/tests/src/expected/Completion.res.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,12 @@ Path Array.
508508
"tags": [],
509509
"detail": "(array<'a>, int) => option<'a>",
510510
"documentation": {"kind": "markdown", "value": "\n`get(array, index)` returns the element at `index` of `array`.\n\nReturns `None` if the index does not exist in the array. Equivalent to doing `array[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray\n->Array.get(0)\n->assertEqual(Some(\"Hello\"))\n\narray\n->Array.get(3)\n->assertEqual(None)\n```\n"}
511+
}, {
512+
"label": "removeInPlace",
513+
"kind": 12,
514+
"tags": [],
515+
"detail": "(array<'a>, int) => unit",
516+
"documentation": {"kind": "markdown", "value": "\n`removeInPlace(array, index)` removes the item at the specified `index` from `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet array = []\narray->Array.removeInPlace(0)\nassertEqual(array, []) // Removing from an empty array does nothing\n\nlet array2 = [\"Hello\", \"Hi\", \"Good bye\"]\narray2->Array.removeInPlace(1)\nassertEqual(array2, [\"Hello\", \"Good bye\"]) // Removes the item at index 1\n```\n "}
511517
}, {
512518
"label": "pushMany",
513519
"kind": 12,

tests/analysis_tests/tests/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ reset='\033[0m'
2222

2323
diff=$(git ls-files --modified src/expected)
2424
if [[ $diff = "" ]]; then
25-
printf "${successGreen}✅ No unstaged tests difference.${reset}\n"
25+
printf "${successGreen}✅ No analysis_tests snapshot changes detected.${reset}\n"
2626
else
27-
printf "${warningYellow}⚠️ There are unstaged differences in tests/! Did you break a test?\n${diff}\n${reset}"
27+
printf "${warningYellow}⚠️ The analysis_tests snapshot doesn't match. Double check that the output is correct and run 'make analysis_tests' if you get the error in CI\n${diff}\n${reset}"
2828
git --no-pager diff src/expected
2929
exit 1
3030
fi

0 commit comments

Comments
 (0)