kinto.js icon indicating copy to clipboard operation
kinto.js copied to clipboard

Create end-to-end type test

Open dstaley opened this issue 5 years ago • 1 comments

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 avatar Nov 11 '19 22:11 dstaley

Great, yes!

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

leplatrem avatar Nov 12 '19 10:11 leplatrem