changeset 261:c1dc3d7d0552

Fix tslint violations in test files Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025497.html
author Andrew Azores <aazores@redhat.com>
date Mon, 23 Oct 2017 10:45:02 -0400
parents c37b4d997182
children 9f3ee8157ac6
files src/app/shared/filters/extract-class.pipe.spec.ts src/app/shared/filters/format-bytes.pipe.spec.ts
diffstat 2 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/app/shared/filters/extract-class.pipe.spec.ts	Mon Sep 25 16:01:13 2017 -0400
+++ b/src/app/shared/filters/extract-class.pipe.spec.ts	Mon Oct 23 10:45:02 2017 -0400
@@ -25,27 +25,27 @@
  * exception statement from your version.
  */
 
-import * as sinon from 'sinon';
+import * as sinon from "sinon";
 
-import { ExtractClassPipe } from './extract-class.pipe';
 import { ExtractClassService } from "shared/services/extract-class.service";
+import { ExtractClassPipe } from "./extract-class.pipe";
 
-describe('ExtractClassPipe', () => {
+describe("ExtractClassPipe", () => {
 
   let pipe: ExtractClassPipe;
   let svc: ExtractClassService;
   beforeEach(() => {
     svc = {
-      extract: sinon.stub().returns('svc-result')
+      extract: sinon.stub().returns("svc-result"),
     };
     pipe = new ExtractClassPipe(svc);
   });
 
-  it('should delegate to service', () => {
+  it("should delegate to service", () => {
     svc.extract.should.not.be.called();
-    pipe.transform('foo', true).should.equal('svc-result');
+    pipe.transform("foo", true).should.equal("svc-result");
     svc.extract.should.be.calledOnce();
-    svc.extract.should.be.calledWith('foo', true);
+    svc.extract.should.be.calledWith("foo", true);
   });
 
 });
--- a/src/app/shared/filters/format-bytes.pipe.spec.ts	Mon Sep 25 16:01:13 2017 -0400
+++ b/src/app/shared/filters/format-bytes.pipe.spec.ts	Mon Oct 23 10:45:02 2017 -0400
@@ -25,13 +25,13 @@
  * exception statement from your version.
  */
 
-import * as sinon from 'sinon';
+import * as sinon from "sinon";
 
-import { FormatBytesPipe } from './format-bytes.pipe';
-import { Metric } from './metric';
-import { ScaleBytesService } from 'shared/services/scale-bytes.service'
+import { ScaleBytesService } from "shared/services/scale-bytes.service";
+import { FormatBytesPipe } from "./format-bytes.pipe";
+import { Metric } from "./metric";
 
-describe('FormatBytesPipe', () => {
+describe("FormatBytesPipe", () => {
 
   let pipe: FormatBytesPipe;
   let svc: ScaleBytesService;
@@ -40,19 +40,19 @@
       format: sinon.stub().returns({
         result: 100,
         scale: 2,
-        unit: 'KiB'
+        unit: "KiB",
       }),
       metricToBigInt: null,
-      sizes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],
+      sizes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"],
     };
     pipe = new FormatBytesPipe(svc);
   });
 
-  it('should delegate to service', () => {
+  it("should delegate to service", () => {
     svc.format.should.not.be.called();
-    pipe.transform({ $numberLong: '2' }).should.equal('100 KiB');
+    pipe.transform({ $numberLong: "2" }).should.equal("100 KiB");
     svc.format.should.be.calledOnce();
-    svc.format.should.be.calledWithMatch({ $numberLong: '2' });
+    svc.format.should.be.calledWithMatch({ $numberLong: "2" });
   });
 
 });