katowulf / mockfirebase

Firebase mock library for writing unit tests (experimental)
157 stars 40 forks source link

setPriority should trigger `value` listeners; #99

Open jamestalmage opened 9 years ago

jamestalmage commented 9 years ago

Firebase behaves as follows

(This is from a REPL session in browser console, so time passes between each line)

var ref = new Firebase('url/to/string/value');
ref.set('hello');

ref.on('value', function(snap) { console.log(snap.exportVal());});
// => "hello" is logged to the console

ref.setPriority(100);
// => {'.value': 'hello', '.priority': 100} is logged to the console