Skip to content

Commit

Permalink
fix schema version test (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauna-chase authored Jul 18, 2023
1 parent 06a165b commit fcc2d70
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions __tests__/integration/schema-version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ describe("schema version is returned by the client", () => {
const client = getClient();
it("returns the schema version", async () => {
const resTs = await client.query(fql`
Collection.create({ name: "TestColl" })
if (Collection.byName("TestColl") == null) {
Collection.create({ name: "TestColl" })
} else {
TestColl.definition.update({})
}
`);

const expectedSchemaVersion = resTs.txn_ts;

const res = await client.query(fql`
Customers.all()
TestColl.all()
`);

expect(res.schema_version).toEqual(expectedSchemaVersion);
Expand Down

0 comments on commit fcc2d70

Please sign in to comment.