From ed5403de8e5e3420cd3cac51e0aaa2ac9d610c47 Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Thu, 31 Aug 2023 12:07:46 -0500 Subject: [PATCH] Fix tests to run using GMT TZ --- plugins/autocast/package.json | 2 +- plugins/autocast/src/autocast.plugin.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/autocast/package.json b/plugins/autocast/package.json index 7c86cddd6..67a1ea621 100644 --- a/plugins/autocast/package.json +++ b/plugins/autocast/package.json @@ -16,7 +16,7 @@ "build": "parcel build", "dev": "parcel watch", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand" + "test": "TZ=GMT jest ./**/*.spec.ts --config=../../jest.config.js --runInBand" }, "keywords": [], "author": "Alex Hollenbeck", diff --git a/plugins/autocast/src/autocast.plugin.spec.ts b/plugins/autocast/src/autocast.plugin.spec.ts index 7da0d50c4..c424361ec 100644 --- a/plugins/autocast/src/autocast.plugin.spec.ts +++ b/plugins/autocast/src/autocast.plugin.spec.ts @@ -14,7 +14,7 @@ describe('autocast plugin', () => { describe.each(['1.1', 1.1])('should return a decimal', (num) => { expect(castNumber(num)).toBe(1.1) }) - it('should return a number', () => { + it('string numbers with commas should return a number', () => { expect(castNumber('1,100')).toBe(1100) }) describe.each(TRUTHY_VALUES)('should return a truthy boolean', (truthy) => {