feat(medusa): Split base service to its related TransactionBaseService and utilities methods when required
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { In, Not } from "typeorm"
|
||||
import { buildQuery } from "../build-query"
|
||||
|
||||
describe('buildQuery', () => {
|
||||
describe("buildQuery_", () => {
|
||||
it("successfully creates query", () => {
|
||||
const q = buildQuery(
|
||||
{
|
||||
id: "1234",
|
||||
test1: ["123", "12", "1"],
|
||||
test2: Not("this"),
|
||||
},
|
||||
{
|
||||
relations: ["1234"],
|
||||
}
|
||||
)
|
||||
|
||||
expect(q).toEqual({
|
||||
where: {
|
||||
id: "1234",
|
||||
test1: In(["123", "12", "1"]),
|
||||
test2: Not("this"),
|
||||
},
|
||||
relations: ["1234"],
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user