Fix type checks.
This commit is contained in:
parent
c81ca66aa4
commit
fde5825589
|
@ -110,7 +110,7 @@ describe.each([
|
||||||
config.api.row.get(tbl_Id, id, { expectStatus: status })
|
config.api.row.get(tbl_Id, id, { expectStatus: status })
|
||||||
|
|
||||||
const getRowUsage = async () => {
|
const getRowUsage = async () => {
|
||||||
const { total } = await config.doInContext(null, () =>
|
const { total } = await config.doInContext(undefined, () =>
|
||||||
quotas.getCurrentUsageValues(QuotaUsageType.STATIC, StaticQuotaName.ROWS)
|
quotas.getCurrentUsageValues(QuotaUsageType.STATIC, StaticQuotaName.ROWS)
|
||||||
)
|
)
|
||||||
return total
|
return total
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe("syncApps", () => {
|
||||||
afterAll(config.end)
|
afterAll(config.end)
|
||||||
|
|
||||||
it("runs successfully", async () => {
|
it("runs successfully", async () => {
|
||||||
return config.doInContext(null, async () => {
|
return config.doInContext(undefined, async () => {
|
||||||
// create the usage quota doc and mock usages
|
// create the usage quota doc and mock usages
|
||||||
await quotas.getQuotaUsage()
|
await quotas.getQuotaUsage()
|
||||||
await quotas.setUsage(3, StaticQuotaName.APPS, QuotaUsageType.STATIC)
|
await quotas.setUsage(3, StaticQuotaName.APPS, QuotaUsageType.STATIC)
|
||||||
|
|
|
@ -12,8 +12,8 @@ describe("syncCreators", () => {
|
||||||
afterAll(config.end)
|
afterAll(config.end)
|
||||||
|
|
||||||
it("syncs creators", async () => {
|
it("syncs creators", async () => {
|
||||||
return config.doInContext(null, async () => {
|
return config.doInContext(undefined, async () => {
|
||||||
await config.createUser({ admin: true })
|
await config.createUser({ admin: { global: true } })
|
||||||
|
|
||||||
await syncCreators.run()
|
await syncCreators.run()
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe("syncRows", () => {
|
||||||
afterAll(config.end)
|
afterAll(config.end)
|
||||||
|
|
||||||
it("runs successfully", async () => {
|
it("runs successfully", async () => {
|
||||||
return config.doInContext(null, async () => {
|
return config.doInContext(undefined, async () => {
|
||||||
// create the usage quota doc and mock usages
|
// create the usage quota doc and mock usages
|
||||||
await quotas.getQuotaUsage()
|
await quotas.getQuotaUsage()
|
||||||
await quotas.setUsage(300, StaticQuotaName.ROWS, QuotaUsageType.STATIC)
|
await quotas.setUsage(300, StaticQuotaName.ROWS, QuotaUsageType.STATIC)
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe("syncUsers", () => {
|
||||||
afterAll(config.end)
|
afterAll(config.end)
|
||||||
|
|
||||||
it("syncs users", async () => {
|
it("syncs users", async () => {
|
||||||
return config.doInContext(null, async () => {
|
return config.doInContext(undefined, async () => {
|
||||||
await config.createUser()
|
await config.createUser()
|
||||||
|
|
||||||
await syncUsers.run()
|
await syncUsers.run()
|
||||||
|
|
|
@ -81,7 +81,7 @@ describe("sdk >> rows >> internal", () => {
|
||||||
const response = await internalSdk.save(
|
const response = await internalSdk.save(
|
||||||
table._id!,
|
table._id!,
|
||||||
row,
|
row,
|
||||||
config.user._id
|
config.getUser()._id
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(response).toEqual({
|
expect(response).toEqual({
|
||||||
|
@ -129,7 +129,7 @@ describe("sdk >> rows >> internal", () => {
|
||||||
const response = await internalSdk.save(
|
const response = await internalSdk.save(
|
||||||
table._id!,
|
table._id!,
|
||||||
row,
|
row,
|
||||||
config.user._id
|
config.getUser()._id
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(response).toEqual({
|
expect(response).toEqual({
|
||||||
|
@ -190,15 +190,15 @@ describe("sdk >> rows >> internal", () => {
|
||||||
|
|
||||||
await config.doInContext(config.appId, async () => {
|
await config.doInContext(config.appId, async () => {
|
||||||
for (const row of makeRows(5)) {
|
for (const row of makeRows(5)) {
|
||||||
await internalSdk.save(table._id!, row, config.user._id)
|
await internalSdk.save(table._id!, row, config.getUser()._id)
|
||||||
}
|
}
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
makeRows(10).map(row =>
|
makeRows(10).map(row =>
|
||||||
internalSdk.save(table._id!, row, config.user._id)
|
internalSdk.save(table._id!, row, config.getUser()._id)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
for (const row of makeRows(5)) {
|
for (const row of makeRows(5)) {
|
||||||
await internalSdk.save(table._id!, row, config.user._id)
|
await internalSdk.save(table._id!, row, config.getUser()._id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue