mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
cosmetics: fixed admin skeleton, use password field on auth, use $console in auth middleware
This commit is contained in:
@@ -5,7 +5,8 @@ import { DataApi } from "../../src/data/api/DataApi";
|
||||
import { DataController } from "../../src/data/api/DataController";
|
||||
import { dataConfigSchema } from "../../src/data/data-schema";
|
||||
import * as proto from "../../src/data/prototype";
|
||||
import { disableConsoleLog, enableConsoleLog, schemaToEm } from "../helper";
|
||||
import { schemaToEm } from "../helper";
|
||||
import { disableConsoleLog, enableConsoleLog } from "core/utils/test";
|
||||
|
||||
beforeAll(disableConsoleLog);
|
||||
afterAll(enableConsoleLog);
|
||||
@@ -64,6 +65,15 @@ describe("DataApi", () => {
|
||||
const res = await req;
|
||||
expect(res.data).toEqual(payload as any);
|
||||
}
|
||||
|
||||
{
|
||||
// make sure sort is working
|
||||
const req = await api.readMany("posts", {
|
||||
select: ["title"],
|
||||
sort: "-id",
|
||||
});
|
||||
expect(req.data).toEqual(payload.reverse() as any);
|
||||
}
|
||||
});
|
||||
|
||||
it("updates many", async () => {
|
||||
|
||||
Reference in New Issue
Block a user