Exemple #1
0
 it('should delete the given checkpoint', async () => {
   await context.initialize(true);
   const model = await context.createCheckpoint();
   context.deleteCheckpoint(model.id);
   const models = await context.listCheckpoints();
   expect(models.length).to.equal(0);
 });
Exemple #2
0
 it('should list the checkpoints for the file', async () => {
   await context.initialize(true);
   const model = await context.createCheckpoint();
   const id = model.id;
   const models = await context.listCheckpoints();
   let found = false;
   for (const model of models) {
     if (model.id === id) {
       found = true;
     }
   }
   expect(found).to.equal(true);
 });
Exemple #3
0
 context.createCheckpoint().then(model => {
   id = model.id;
   return context.listCheckpoints();
 }).then(models => {
Exemple #4
0
 }).then(() => {
   return context.listCheckpoints();
 }).then(models => {
Exemple #5
0
 .then(model => {
   id = model.id;
   return context.listCheckpoints();
 })