Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create end-to-end type test #1752

Open
dstaley opened this issue Nov 11, 2019 · 1 comment
Open

Create end-to-end type test #1752

dstaley opened this issue Nov 11, 2019 · 1 comment
Assignees

Comments

@dstaley
Copy link
Member

dstaley commented Nov 11, 2019

It would be nice to have a single file that runs through all the various methods to ensure that types can pass between methods as expected.

For example:

const client = new KintoClient("http://server.com");

const createBucketResult = await client.createBucket("name");
const bucket = client.bucket(createBucketResult.data.id);

const createCollectionResult = await bucket.createCollection("things");
const collection = bucket.collection(createCollectionResult.result.id);

const createRecordResult = await collection.createRecord({ petName: "Jpeg" });
const updatedRecord = await collection.updateRecord(createRecordResult.data);
console.log(updatedRecord.data.pet);
@dstaley dstaley self-assigned this Nov 11, 2019
@leplatrem
Copy link
Contributor

Great, yes!

This could be part of https://github.com/Kinto/kinto-http.js/blob/master/test/integration_test.ts

@dstaley dstaley transferred this issue from Kinto/kinto-http.js Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants