From d56e06fec7824ea64c3b0c3f53209c118438d371 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Sat, 23 May 2020 20:08:30 -0700 Subject: [PATCH] video example in ~90 lines --- examples/basic/screen.html | 59 --------------------------- examples/basic/video.html | 83 ++++++++++++++++++++++++++++++++++++++ test/common.js | 22 ++++++++++ 3 files changed, 105 insertions(+), 59 deletions(-) delete mode 100644 examples/basic/screen.html create mode 100644 examples/basic/video.html diff --git a/examples/basic/screen.html b/examples/basic/screen.html deleted file mode 100644 index 3587027d..00000000 --- a/examples/basic/screen.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -
- - -
- - - - - \ No newline at end of file diff --git a/examples/basic/video.html b/examples/basic/video.html new file mode 100644 index 00000000..2d0ddd8c --- /dev/null +++ b/examples/basic/video.html @@ -0,0 +1,83 @@ + + + +
+ + + Record or +
+ + + + + + \ No newline at end of file diff --git a/test/common.js b/test/common.js index bee8a035..164e3cd1 100644 --- a/test/common.js +++ b/test/common.js @@ -2866,6 +2866,28 @@ describe('Gun', function(){ }); }); + it('once put once', function(done){ + gun.get('opo').get('a').put('yay!'); + var ref = gun.get('opo').get('a'); + setTimeout(function(){ + ref.once(function(data){ + expect(data).to.be('yay!'); + + setTimeout(function(){ + gun.get('opo').get('a').put('z'); + + + setTimeout(function(){ + ref.once(function(data){ + expect(data).to.be('z'); + done(); + }); + }, 25); + }, 25); + }) + }, 25); + }); + it('get node after recursive field', function(done){ var bob = {age: 29, name: "Bob!"}; var cat = {name: "Fluffy", species: "kitty"};