TBD54566975 / bundler-bonanza

4 stars 4 forks source link

Determine Bare minimum tests #29

Closed leordev closed 11 months ago

leordev commented 11 months ago

We want to figure out the simplest way to test that our web5 bundling works in the respective environments.

For example, is the below code snippet sufficient enough for a bare minimum test:

import { Web5 } from '@tbd54566975/web5';

const { web5, did } = await Web5.connect({
  techPreview: {
    dwnEndpoints: ['http://localhost:3000']
  }
});

const { record, status } = await web5.dwn.records.write({
  data: 'Hello!'
});

console.log(JSON.stringify(status, null, 2));
console.log(record);

If the above code runs without throwing any exception, are we proving that it works for this environment?

dayhaysoos commented 11 months ago

Got confirmation from Daniel that we should at least run all the main DWN functions:

https://discord.com/channels/937858703112155166/969272658501976117/1159229230551400548

This would probably just be CRUD operations on DWN.