From 85975838274640ad91432ebe3e583961087fdaba Mon Sep 17 00:00:00 2001 From: ehmicky Date: Sun, 27 Oct 2024 23:35:04 +0000 Subject: [PATCH] Fix tests in CI --- src/helpers/main.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/helpers/main.test.js b/src/helpers/main.test.js index b11de1f..532b293 100644 --- a/src/helpers/main.test.js +++ b/src/helpers/main.test.js @@ -1,13 +1,15 @@ -// eslint-disable-next-line ava/no-ignored-test-files import test from 'ava' +import isCI from 'is-ci' import { each } from 'test-each' import { ALL_STRINGS } from './strings.test.js' import stringByteLength from 'string-byte-length' +const testFunction = isCI ? test.serial : test + each(ALL_STRINGS, ({ title }, { string, size }) => { - test(`Should compute the byte length | ${title}`, (t) => { + testFunction(`Should compute the byte length | ${title}`, (t) => { t.is(stringByteLength(string), size) }) })