message: add regex query test
diff: @@ -11,7 +11,7 @@ import {
  IDocumentStore,
  } from "../../../src";
  -xdescribe("Regex query", function () {
  +describe("Regex query", function () {
  let store: IDocumentStore;
  @@ -22,7 +22,39 @@ xdescribe("Regex query", function () {
  afterEach(async () =>
  await disposeTestDocumentStore(store));
  - it("can ", async () => {
  - throw new Error("Query");
  + beforeEach(async () => {
  + const session = store.openSession();
  + await session.store(new RegexMe("I love dogs and cats"));
  + await session.store(new RegexMe("I love cats"));
  + await session.store(new RegexMe("I love dogs"));
  + await session.store(new RegexMe("I love bats"));
  + await session.store(new RegexMe("dogs love me"));
  + await session.store(new RegexMe("cats love me"));
  + await session.saveChanges();
  + });
  +
  + it("can do queries with regex from documentQuery", async () => {
  + const session = store.openSession();
  + const query = session.
  + advanced
  + .documentQuery(RegexMe)
  + .whereRegex("text", "^[a-z ]{2,4}love");
  +
  + const iq = query.getIndexQuery();
  +
  + assert.equal(iq.query, "from RegexMes where regex(text, $p0)");
  +
  + assert.equal(iq.queryParameters["p0"], "^[a-z ]{2,4}love");
  +
  + const result = await query.all();
  + assert.equal(result.length, 4);
  });
  });
  +
  +class RegexMe {
  + private text: string;
  +
  + public constructor(text?: string) {
  + this.text = text;
  + }
  +}
  