mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-17 21:33:16 +08:00
11 lines
490 B
JavaScript
11 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);
|
||
|
});
|