From 41d8247ffc0af99d701db7d256f5dcc1ce1ba209 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Wed, 28 Aug 2019 13:54:42 -0700 Subject: [PATCH] test: tsify internal-spec (#19962) --- spec/internal-spec.js => spec-main/internal-spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) rename spec/internal-spec.js => spec-main/internal-spec.ts (75%) diff --git a/spec/internal-spec.js b/spec-main/internal-spec.ts similarity index 75% rename from spec/internal-spec.js rename to spec-main/internal-spec.ts index 823d2f8afcff..320f241789b3 100644 --- a/spec/internal-spec.js +++ b/spec-main/internal-spec.ts @@ -1,12 +1,11 @@ -const chai = require('chai') -const { expect } = chai +import { expect } from 'chai' describe('feature-string parsing', () => { it('is indifferent to whitespace around keys and values', () => { const parseFeaturesString = require('../lib/common/parse-features-string') - const checkParse = (string, parsed) => { - const features = {} - parseFeaturesString(string, (k, v) => { features[k] = v }) + const checkParse = (string: string, parsed: Record) => { + const features: Record = {} + parseFeaturesString(string, (k: string, v: any) => { features[k] = v }) expect(features).to.deep.equal(parsed) } checkParse('a=yes,c=d', { a: true, c: 'd' })