From 4439436f87b520e907abf02d145d84eaef856091 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Tue, 7 Mar 2017 13:47:21 -0800 Subject: [PATCH] fix behavior warn test. --- test/unit/behaviors.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/unit/behaviors.html b/test/unit/behaviors.html index daafb592cb..27535891e3 100644 --- a/test/unit/behaviors.html +++ b/test/unit/behaviors.html @@ -414,11 +414,7 @@ }); test('behavior is null generates warning', function() { - var warned = false, oldWarn = Polymer._warn; - Polymer._warn = function(message) { - assert.match(message, /behavior is null/); - warned = true; - }; + sinon.spy(console, 'warn'); Polymer({ is: 'behavior-null', behaviors: [ @@ -426,8 +422,8 @@ ] }); document.createElement('behavior-null'); - assert.equal(warned, true, 'Null behaviour should generate warning'); - Polymer.Base._warn = oldWarn; + assert.equal(console.warn.callCount, 1, 'Null behaviour should generate warning'); + console.warn.restore(); }); test('behavior array is unique', function() {