mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 00:01:52 +00:00
fix @steedos/filters unit test errors
This commit is contained in:
parent
474d75d0b3
commit
ad297b8e9b
@ -7,7 +7,7 @@ describe('format filter and fields to graphql query', () => {
|
||||
let fields = ["a","a.b.a","x.y","c"];
|
||||
let result = formatFiltersToGraphqlQuery("contracts", filters, fields);
|
||||
console.log("graphql filters query result:", result);
|
||||
expect(result).to.be.include(`((create_date ge 2020-01-01T00:00:00Z) and (create_date le 2020-12-31T23:59:59Z))`);
|
||||
expect(result).to.be.include(`((create_date ge ${(new Date()).getFullYear()}-01-01T00:00:00Z) and (create_date le ${(new Date()).getFullYear()}-12-31T23:59:59Z))`);
|
||||
expect(result).to.be.include(" a {");
|
||||
expect(result).to.be.include(" b {");
|
||||
expect(result).to.be.include(" x {");
|
||||
@ -18,7 +18,7 @@ describe('format filter and fields to graphql query', () => {
|
||||
let fields = "a,a.b.a,x.y,c";
|
||||
let result = formatFiltersToGraphqlQuery("contracts", filters, fields);
|
||||
console.log("graphql filters query result:", result);
|
||||
expect(result).to.be.include(`((create_date ge 2020-01-01T00:00:00Z) and (create_date le 2020-12-31T23:59:59Z))`);
|
||||
expect(result).to.be.include(`((create_date ge ${(new Date()).getFullYear()}-01-01T00:00:00Z) and (create_date le ${(new Date()).getFullYear()}-12-31T23:59:59Z))`);
|
||||
expect(result).to.be.include(" a {");
|
||||
expect(result).to.be.include(" b {");
|
||||
expect(result).to.be.include(" x {");
|
||||
|
Loading…
Reference in New Issue
Block a user