MapleLeaf 🍁
CCConvex Community
•Created by MapleLeaf 🍁 on 12/4/2023 in #support-community
e2e testing with preview deployments
I'm trying to get a setup where I can run e2e tests in Github CI against a preview environment. Here's what I have:
I want my tests to run seed functions before they go, e.g.
this doesn't work in CI because the tests are ran outside the convex deploy context and don't have the
CONVEX_DEPLOYMENT
environment variable
I can --preview-run seed:characters
, but I want to be able to run specific functions for specific tests to replicate certain setup scenarios without the test going through the UI to do so
so my question is: how can I pass the info from convex deploy
such that I can run functions during the tests?28 replies
CCConvex Community
•Created by MapleLeaf 🍁 on 8/23/2023 in #support-community
Feature request: v.nullish(someValidator)
Equivalent to this:
Because I often CBA whether an input is null or undefined :lul: so many data sources will just decide whether to do one or the other
2 replies
CCConvex Community
•Created by MapleLeaf 🍁 on 8/21/2023 in #support-community
Collection size limit
I have a collection of items that'll get created frequently, and I don't need to store them forever, so I want to delete old entries to preserve space.
My current strategy is to delete extra items once the collection size is over some arbitrary max.
I'm not that worried about performance since the collection isn't that big, nor is the limit, but I still wonder if there's a more performant/idiomatic way to accomplish this.
Here's my code:
4 replies
CCConvex Community
•Created by MapleLeaf 🍁 on 8/18/2023 in #support-community
Feature request: v.record() and v.unknown()
I have a case where I want to store arbitrary data specifically as an object of type
Record<string, string | number>
but that doesn't seem to be possible with the current validators
As a somewhat related aside, v.unknown()
would be a much more welcome and safer alternative to v.any()
9 replies