* allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
// This file is generated by Continue
|
|
import { longestCommonSubsequence } from "../../util/lcs";
|
|
|
|
describe("longestCommonSubsequence", () => {
|
|
beforeAll(() => {
|
|
// Setup if needed
|
|
});
|
|
|
|
afterAll(() => {
|
|
// Teardown if needed
|
|
});
|
|
|
|
test("should return the longest common subsequence for non-empty strings", () => {
|
|
expect(longestCommonSubsequence("abcde", "ace")).toBe("ace");
|
|
expect(longestCommonSubsequence("abc", "abc")).toBe("abc");
|
|
expect(longestCommonSubsequence("abc", "def")).toBe("");
|
|
});
|
|
|
|
test("should handle cases where one or both strings are empty", () => {
|
|
expect(longestCommonSubsequence("", "abc")).toBe("");
|
|
expect(longestCommonSubsequence("abc", "")).toBe("");
|
|
expect(longestCommonSubsequence("", "")).toBe("");
|
|
});
|
|
|
|
test("should handle cases with no common subsequence", () => {
|
|
expect(longestCommonSubsequence("abc", "def")).toBe("");
|
|
expect(longestCommonSubsequence("xyz", "abc")).toBe("");
|
|
});
|
|
|
|
test("should handle cases with special characters", () => {
|
|
expect(longestCommonSubsequence("a!@#b$c", "!@#$")).toBe("!@#$");
|
|
expect(longestCommonSubsequence("a!@#b$c", "xyz")).toBe("");
|
|
});
|
|
|
|
test("should handle long strings efficiently", () => {
|
|
const str1 = "a".repeat(1000) + "b".repeat(1000);
|
|
const str2 = "a".repeat(1000) + "c".repeat(1000);
|
|
expect(longestCommonSubsequence(str1, str2)).toBe("a".repeat(1000));
|
|
});
|
|
});
|