Skip to content

Commit

Permalink
web: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tbantle22 committed Oct 30, 2023
1 parent caa438a commit 907a327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/lib/parseSqlQuery/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ describe("parse sql query", () => {

it("gets query type", () => {
expect(getQueryType("SELECT * FROM tablename")).toEqual("select");
expect(getQueryType("SHOW TABLES")).toEqual(undefined);
expect(getQueryType("SHOW TABLES")).toEqual("show");
expect(
getQueryType("INSERT INTO tablename (id, name) values (1, 'taylor')"),
).toEqual("insert");
Expand Down Expand Up @@ -334,7 +334,7 @@ describe("removes column from query", () => {
query: `SELECT id, name, age FROM tablename WHERE NOT (id=1 AND name = "MCDONALD'S")`,
colToRemove: "name",
cols: columns,
expected: `SELECT \`id\`, \`age\` FROM \`tablename\` WHERE NOT(\`id\` = 1 AND \`name\` = 'MCDONALD\\'S')`,
expected: `SELECT \`id\`, \`age\` FROM \`tablename\` WHERE NOT(\`id\` = 1 AND \`name\` = "MCDONALD\\'S")`,
},
{
desc: "select query with where clause with escaped single quote",
Expand Down

0 comments on commit 907a327

Please sign in to comment.