update test data

This commit is contained in:
Abi Raja 2023-12-06 21:58:06 -05:00
parent 97d651343a
commit eff532bcf5

View File

@ -4,21 +4,21 @@ import { extractHistoryTree } from "./utils";
const data = [ const data = [
{ {
type: "ai_edit" as const, type: "ai_edit" as const,
code: "<html>edit with better icons and red text</html>", code: "<html>3. edit with better icons and red text</html>",
inputs: { inputs: {
prompt: "make text red", prompt: "make text red",
}, },
}, },
{ {
type: "ai_edit" as const, type: "ai_edit" as const,
code: "<html>edit with better icons</html>", code: "<html>2. edit with better icons</html>",
inputs: { inputs: {
prompt: "use better icons", prompt: "use better icons",
}, },
}, },
{ {
type: "ai_create" as const, type: "ai_create" as const,
code: "<html>create</html>", code: "<html>1. create</html>",
inputs: { inputs: {
image_url: "", image_url: "",
}, },
@ -27,12 +27,12 @@ const data = [
test("should only include history from this point onward", () => { test("should only include history from this point onward", () => {
expect(extractHistoryTree(data, 0)).toEqual([ expect(extractHistoryTree(data, 0)).toEqual([
"<html>create</html>", "<html>1. create</html>",
"use better icons", "use better icons",
"<html>edit with better icons</html>", "<html>2. edit with better icons</html>",
"make text red", "make text red",
"<html>edit with better icons and red text</html>", "<html>3. edit with better icons and red text</html>",
]); ]);
expect(extractHistoryTree(data, 2)).toEqual(["<html>create</html>"]); expect(extractHistoryTree(data, 2)).toEqual(["<html>1. create</html>"]);
}); });