Exemple #1
0
 it('should restore the value to the last checkpoint value', async () => {
   context.model.fromString('bar');
   await context.initialize(true);
   const model = await context.createCheckpoint();
   context.model.fromString('foo');
   const id = model.id;
   await context.save();
   await context.restoreCheckpoint(id);
   await context.revert();
   expect(context.model.toString()).to.equal('bar');
 });
Exemple #2
0
 }).then(() => {
   return context.restoreCheckpoint(id);
 }).then(() => {