ES6ify /gr-linked-chip/*
Bug: Issue 6179 Change-Id: I415ac876ce8a74eee681cd9ad17ca832d289ba02
This commit is contained in:
@@ -30,11 +30,11 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
_getBackgroundClass: function(transparent) {
|
_getBackgroundClass(transparent) {
|
||||||
return transparent ? 'transparentBackground' : '';
|
return transparent ? 'transparentBackground' : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
_handleRemoveTap: function(e) {
|
_handleRemoveTap(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.fire('remove');
|
this.fire('remove');
|
||||||
},
|
},
|
||||||
|
@@ -34,21 +34,21 @@ limitations under the License.
|
|||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
suite('gr-linked-chip tests', function() {
|
suite('gr-linked-chip tests', () => {
|
||||||
var element;
|
let element;
|
||||||
var sandbox;
|
let sandbox;
|
||||||
|
|
||||||
setup(function() {
|
setup(() => {
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
sandbox = sinon.sandbox.create();
|
sandbox = sinon.sandbox.create();
|
||||||
});
|
});
|
||||||
|
|
||||||
teardown(function() {
|
teardown(() => {
|
||||||
sandbox.restore();
|
sandbox.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('remove fired', function() {
|
test('remove fired', () => {
|
||||||
var spy = sandbox.spy();
|
const spy = sandbox.spy();
|
||||||
element.addEventListener('remove', spy);
|
element.addEventListener('remove', spy);
|
||||||
flushAsynchronousOperations();
|
flushAsynchronousOperations();
|
||||||
MockInteractions.tap(element.$.remove);
|
MockInteractions.tap(element.$.remove);
|
||||||
|
Reference in New Issue
Block a user