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 })
|
||||
|
||||
const getRowUsage = async () => {
|
||||
const { total } = await config.doInContext(null, () =>
|
||||
const { total } = await config.doInContext(undefined, () =>
|
||||
quotas.getCurrentUsageValues(QuotaUsageType.STATIC, StaticQuotaName.ROWS)
|
||||
)
|
||||
return total
|
||||
|
|
|
@ -13,7 +13,7 @@ describe("syncApps", () => {
|
|||
afterAll(config.end)
|
||||
|
||||
it("runs successfully", async () => {
|
||||
return config.doInContext(null, async () => {
|
||||
return config.doInContext(undefined, async () => {
|
||||
// create the usage quota doc and mock usages
|
||||
await quotas.getQuotaUsage()
|
||||
await quotas.setUsage(3, StaticQuotaName.APPS, QuotaUsageType.STATIC)
|
||||
|
|
|
@ -12,8 +12,8 @@ describe("syncCreators", () => {
|
|||
afterAll(config.end)
|
||||
|
||||
it("syncs creators", async () => {
|
||||
return config.doInContext(null, async () => {
|
||||
await config.createUser({ admin: true })
|
||||
return config.doInContext(undefined, async () => {
|
||||
await config.createUser({ admin: { global: true } })
|
||||
|
||||
await syncCreators.run()
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("syncRows", () => {
|
|||
afterAll(config.end)
|
||||
|
||||
it("runs successfully", async () => {
|
||||
return config.doInContext(null, async () => {
|
||||
return config.doInContext(undefined, async () => {
|
||||
// create the usage quota doc and mock usages
|
||||
await quotas.getQuotaUsage()
|
||||
await quotas.setUsage(300, StaticQuotaName.ROWS, QuotaUsageType.STATIC)
|
||||
|
|
|
@ -12,7 +12,7 @@ describe("syncUsers", () => {
|
|||
afterAll(config.end)
|
||||
|
||||
it("syncs users", async () => {
|
||||
return config.doInContext(null, async () => {
|
||||
return config.doInContext(undefined, async () => {
|
||||
await config.createUser()
|
||||
|
||||
await syncUsers.run()
|
||||
|
|
|
@ -81,7 +81,7 @@ describe("sdk >> rows >> internal", () => {
|
|||
const response = await internalSdk.save(
|
||||
table._id!,
|
||||
row,
|
||||
config.user._id
|
||||
config.getUser()._id
|
||||
)
|
||||
|
||||
expect(response).toEqual({
|
||||
|
@ -129,7 +129,7 @@ describe("sdk >> rows >> internal", () => {
|
|||
const response = await internalSdk.save(
|
||||
table._id!,
|
||||
row,
|
||||
config.user._id
|
||||
config.getUser()._id
|
||||
)
|
||||
|
||||
expect(response).toEqual({
|
||||
|
@ -190,15 +190,15 @@ describe("sdk >> rows >> internal", () => {
|
|||
|
||||
await config.doInContext(config.appId, async () => {
|
||||
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(
|
||||
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)) {
|
||||
await internalSdk.save(table._id!, row, config.user._id)
|
||||
await internalSdk.save(table._id!, row, config.getUser()._id)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue