mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-18 05:44:12 +08:00
acd100f3d3
* Update Code.Fragment backport * Support structs completion and show module subtype * Support sigil completion * Update changelog * Don't show completion items for hidden modules * Update Code.Fragment backport
10 lines
490 B
JavaScript
10 lines
490 B
JavaScript
import { replacedSuffixLength } from "../../js/highlight/text_utils";
|
|
|
|
test("replacedSuffixLength", () => {
|
|
expect(replacedSuffixLength("to_string(", "")).toEqual(0);
|
|
expect(replacedSuffixLength("to_string(", "length")).toEqual(0);
|
|
expect(replacedSuffixLength("length", "length")).toEqual(6);
|
|
expect(replacedSuffixLength("x = ~", "~r")).toEqual(1);
|
|
expect(replacedSuffixLength("Enum.ma", "map")).toEqual(2);
|
|
expect(replacedSuffixLength("Enum.ma", "map_reduce")).toEqual(2);
|
|
});
|