Skip to content

Commit

Permalink
add minimum version to test
Browse files Browse the repository at this point in the history
  • Loading branch information
macjuul committed Feb 7, 2025
1 parent 1bf76dc commit 960517b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/tests/import.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { describe, expect, test } from "bun:test";
import { setupServer } from "../surreal.ts";
import { fetchVersion } from "../helpers.ts";
import { compareVersions } from "compare-versions";

const { createSurreal } = await setupServer();

describe("import", async () => {
const surreal = await createSurreal();
const version = await fetchVersion(surreal);
const runTest = compareVersions(version, "2.0.0") >= 0;

test("basic", async () => {
test.if(runTest)("basic", async () => {
await surreal.import(/* surql */ `
CREATE foo:1 CONTENT { hello: "world" };
`);
Expand Down

0 comments on commit 960517b

Please # to comment.