Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1051)

Unified Diff: remoting/webapp/unittests/base_unittest.js

Issue 1002553002: Refactor sinon helper to make it easier to use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/unittests/base_unittest.js
diff --git a/remoting/webapp/unittests/base_unittest.js b/remoting/webapp/unittests/base_unittest.js
index 288ff914752cc891e28b26de676aceac40f44503..a5a6a6f6049ac6022f3d6a137a3a06db5c8ad1e0 100644
--- a/remoting/webapp/unittests/base_unittest.js
+++ b/remoting/webapp/unittests/base_unittest.js
@@ -22,14 +22,14 @@ test('mix(dest, src) should assert if properties are overwritten',
var src = { a: 'a', b: 'b'};
var dest = { a: 'a'};
- sinon.$setupStub(base.debug, 'assert');
+ sinon.stub(base.debug, 'assert');
try {
base.mix(dest, src);
} catch (e) {
} finally {
sinon.assert.called(base.debug.assert);
- base.debug.assert.$testStub.restore();
+ $testStub(base.debug.assert).restore();
}
});
@@ -244,13 +244,13 @@ test('raiseEvent() should not invoke listeners of a different event',
test('raiseEvent() should assert when undeclared events are raised',
function() {
- sinon.$setupStub(base.debug, 'assert');
+ sinon.stub(base.debug, 'assert');
try {
source.raiseEvent('undefined');
} catch (e) {
} finally {
sinon.assert.called(base.debug.assert);
- base.debug.assert.$testStub.restore();
+ $testStub(base.debug.assert).restore();
}
});
« no previous file with comments | « remoting/webapp/unittests/apps_v2_migration_unittest.js ('k') | remoting/webapp/unittests/host_table_entry_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698