keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Testing guide is out of date

Open flexdinesh opened this issue 2 years ago • 4 comments
trafficstars

In https://github.com/keystonejs/keystone/pull/7968 we removed the exports from @keystone-6/core/testing. Testing guide still has examples of non-existing exports from @keystone-6/core/testing. Guide needs to be updated.

flexdinesh avatar Dec 11 '22 22:12 flexdinesh

@flexdinesh , Thanks for your response then please let us know how one should test context API with something like Postgres, do we need to have Postgres running? it will be great if you can provide an example for testing the express app also.

sharmsa66 avatar Dec 11 '22 22:12 sharmsa66

Please also note https://github.com/keystonejs/keystone/discussions/8324

rburgst avatar Apr 18 '23 06:04 rburgst

The docs still describe non-existent classes:

I think we should completely drop this section: https://keystonejs.com/docs/guides/testing#test-runner

Unsure if setupTestEnv is coming back; Otherwise we should remove this: https://keystonejs.com/docs/guides/testing#test-environment

Thinkscape avatar Jun 09 '23 02:06 Thinkscape

@Thinkscape I don't think setupTestEnv is coming back, getContext is 99.99% of the utility without the issues. Could you open a pull request to remove the problematic pages? :yellow_heart:

dcousens avatar Jun 09 '23 05:06 dcousens