Skip to content

Allow for passing model entities as objects #604

Allow for passing model entities as objects

Allow for passing model entities as objects #604

Triggered via pull request February 13, 2025 11:26
@leoleo
synchronize #142
leo/ron-1099
Status Failure
Total duration 25s
Artifacts

validate.yml

on: pull_request
validate  /  Linting
9s
validate / Linting
validate  /  Testing
12s
validate / Testing
Fit to window
Zoom out
Zoom in

Annotations

4 errors
validate / Linting
Process completed with exit code 2.
error: expect(received).toEqual(expected): tests/options.test.ts#L187
[ { params: [ "elaine", "[\"[email protected]\",\"[email protected]\"]" ], returning: true, + statement: "INSERT INTO \"accounts\" (\"handle\", \"emails\", \"id\", \"ronin.createdAt\", \"ronin.updatedAt\") VALUES (?1, ?2, 'acc_' || lower(substr(hex(randomblob(12)), 1, 16)), strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z', strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z') RETURNING \"handle\", \"emails\", \"id\", \"ronin.createdAt\", \"ronin.createdBy\", \"ronin.updatedAt\", \"ronin.updatedBy\"", - statement: "INSERT INTO \"accounts\" (\"handle\", \"emails\", \"id\", \"ronin.createdAt\", \"ronin.updatedAt\") VALUES (?1, ?2, 'acc_' || lower(substr(hex(randomblob(12)), 1, 16)), strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z', strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z') RETURNING \"id\", \"ronin.createdAt\", \"ronin.createdBy\", \"ronin.updatedAt\", \"ronin.updatedBy\", \"handle\", \"emails\"", } ] - Expected - 1 + Received + 1 at /home/runner/work/compiler/compiler/tests/options.test.ts:187:34 at /home/runner/work/compiler/compiler/tests/options.test.ts:152:31
error: expect(received).toEqual(expected): tests/meta.test.ts#L112
[ { params: [], statement: "CREATE TABLE \"accounts\" (\"id\" TEXT PRIMARY KEY DEFAULT ('acc_' || lower(substr(hex(randomblob(12)), 1, 16))), \"ronin.createdAt\" DATETIME DEFAULT (strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z'), \"ronin.createdBy\" TEXT, \"ronin.updatedAt\" DATETIME DEFAULT (strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z'), \"ronin.updatedBy\" TEXT, \"handle\" TEXT, \"email\" TEXT UNIQUE NOT NULL COLLATE NOCASE CHECK (length(\"handle\") >= 3), \"position\" INTEGER AUTOINCREMENT, \"name\" TEXT GENERATED ALWAYS AS (UPPER(substr(\"handle\", 1, 1)) || substr(\"handle\", 2)) STORED)", }, { params: [], + statement: "CREATE UNIQUE INDEX \"index_slug\" ON \"undefined\" (\"handle\")", + }, + { + params: [], + statement: "DROP TABLE \"signups\"", + }, + { + params: [], + statement: "DROP TABLE \"undefined\"", + }, + { + params: [], + statement: "CREATE TRIGGER \"trigger_slug\" AFTER INSERT ON \"undefined\" BEGIN INSERT INTO \"signups\" (\"year\") VALUES (2000); END", - statement: "CREATE UNIQUE INDEX \"index_slug\" ON \"accounts\" (\"handle\")", }, { params: [], + statement: "DROP TABLE \"signups\"", + }, + { + params: [], + statement: "DROP TABLE \"undefined\"", - statement: "CREATE TRIGGER \"trigger_slug\" AFTER INSERT ON \"accounts\" BEGIN INSERT INTO \"signups\" (\"year\") VALUES (2000); END", }, { params: [ "account", "{\"id\":{\"name\":\"ID\",\"type\":\"string\",\"slug\":\"id\",\"defaultValue\":{\"__RONIN_EXPRESSION\":\"'acc_' || lower(substr(hex(randomblob(12)), 1, 16))\"}},\"ronin.createdAt\":{\"name\":\"RONIN - Created At\",\"type\":\"date\",\"slug\":\"ronin.createdAt\",\"defaultValue\":{\"__RONIN_EXPRESSION\":\"strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z'\"}},\"ronin.createdBy\":{\"name\":\"RONIN - Created By\",\"type\":\"string\",\"slug\":\"ronin.createdBy\"},\"ronin.updatedAt\":{\"name\":\"RONIN - Updated At\",\"type\":\"date\",\"slug\":\"ronin.updatedAt\",\"defaultValue\":{\"__RONIN_EXPRESSION\":\"strftime('%Y-%m-%dT%H:%M:%f', 'now') || 'Z'\"}},\"ronin.updatedBy\":{\"name\":\"RONIN - Updated By\",\"type\":\"string\",\"slug\":\"ronin.updatedBy\"},\"handle\":{\"type\":\"string\",\"name\":\"Handle\"},\"email\":{\"type\":\"string\",\"required\":true,\"unique\":true,\"check\":{\"__RONIN_EXPRESSION\":\"length(__RONIN_FIELD_handle) >= 3\"},\"collation\":\"NOCASE\",\"name\":\"Email\"},\"position\":{\"type\":\"number\",\"increment\":true,\"name\":\"Position\"},\"name\":{\"type\":\"string\",\"computedAs\":{\"kind\":\"STORED\",\"value\":{\"__RONIN_EXPRESSION\":\"UPPER(substr(__RONIN_FIELD_handle, 1, 1)) || substr(__RONIN_FIELD_handle, 2)\"}},\"name\":\"Name\"}}", "{\"indexSlug\":{\"fields\":[{\"slug\":\"handle\"}],\"unique\":true}}", "{\"triggerSlug\":{\"when\":\"AFTER\",\"action\":\"INSERT\",\"effects\":[{\"add\":{\"signup\":{\"with\":{\"year\":2000}}}}]}}", "{\"companyEmployees\":{\"instructions\":{\"with\":{\"email\":{\"endingWith\":\"@company.co\"}}}}}", + "mod_598b14710471dec4", - StringMatching /[a-z]{3}_[a-z0-9]{16}/, "accounts", "Account", "Accounts", "acc", "accounts", "id", "id" ], returning: true, statement: "INSERT INTO \"ronin_schema\" (\"slug\", \"fields\", \"indexes\", \"triggers\", \"presets\", \"id\", \"pluralSlug\", \"name\", \"pluralName\", \"idPrefix\", \"table\", \"identifiers.name\", \"identifiers.slug\") VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13) RETURNING \"id\", \"ronin.createdAt\", \"ronin.createdBy\", \"ronin.updatedAt\", \"ronin.updatedBy\", \"name\", \"pluralName\", \"slug\", \"pluralSlug\", \"idPrefix\", \"table\", \"identifiers.name\", \"identifiers.slug\", \"fields\", \"indexes\", \"triggers\", \"presets\"", } ] - Expected - 3 + Received + 19 at /home/runner/work/compiler/compiler/tests/meta.test.ts:112:34
validate / Testing
Process completed with exit code 1.