|
@@ -49,16 +49,17 @@ describe('workspace', () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- // describe('#list()', async () => {
|
|
|
- // it('should fetch a workspace list supporting arbitrary IDs', async () => {
|
|
|
- // const ids = ['foo', 'bar', 'baz', 'f/o/o', 'b/a/r', 'b/a/z'];
|
|
|
-
|
|
|
- // ids.forEach(async id => {
|
|
|
- // await manager.save(id, { data: {}, metadata: { id } });
|
|
|
- // });
|
|
|
- // expect((await manager.list()).sort()).to.deep.equal(ids.sort());
|
|
|
- // });
|
|
|
- // });
|
|
|
+ describe('#list()', async () => {
|
|
|
+ it('should fetch a workspace list supporting arbitrary IDs', async () => {
|
|
|
+ const ids = ['foo', 'bar', 'baz', 'f/o/o', 'b/a/r', 'b/a/z'];
|
|
|
+ const promises = ids.map(id =>
|
|
|
+ manager.save(id, { data: {}, metadata: { id } })
|
|
|
+ );
|
|
|
+
|
|
|
+ await Promise.all(promises);
|
|
|
+ expect((await manager.list()).ids.sort()).to.deep.equal(ids.sort());
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
describe('#remove()', () => {
|
|
|
it('should remove a workspace', async () => {
|