# HG changeset patch # User Andrew Azores # Date 1508769902 14400 # Node ID c1dc3d7d0552bedc20f49b031927cf7f670175c3 # Parent c37b4d997182685b63f414b72878a65ed4077dbe Fix tslint violations in test files Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025497.html diff -r c37b4d997182 -r c1dc3d7d0552 src/app/shared/filters/extract-class.pipe.spec.ts --- 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); }); }); diff -r c37b4d997182 -r c1dc3d7d0552 src/app/shared/filters/format-bytes.pipe.spec.ts --- 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" }); }); });