From efde05809f55b9e657f2d14b6ba81b14b4ff0298 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Fri, 6 Dec 2024 12:01:54 +0100 Subject: [PATCH] test: fix pattern + setup --- .../core-tests/models/forms/effects/shapes/setGraph.test.ts | 1 - packages/core-tests/models/forms/reducers/properties.test.ts | 1 - packages/core-tests/package.json | 4 ++-- packages/core-tests/{test-setup.js => test-setup.ts} | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-) rename packages/core-tests/{test-setup.js => test-setup.ts} (75%) diff --git a/packages/core-tests/models/forms/effects/shapes/setGraph.test.ts b/packages/core-tests/models/forms/effects/shapes/setGraph.test.ts index 6b08c901..c633b7e8 100644 --- a/packages/core-tests/models/forms/effects/shapes/setGraph.test.ts +++ b/packages/core-tests/models/forms/effects/shapes/setGraph.test.ts @@ -1,4 +1,3 @@ -/// import { describe, it } from 'mocha' import $rdf from '@shaperone/testing/env.js' import { rdf, sh } from '@tpluscode/rdf-ns-builders' diff --git a/packages/core-tests/models/forms/reducers/properties.test.ts b/packages/core-tests/models/forms/reducers/properties.test.ts index e9399433..7d18a5a4 100644 --- a/packages/core-tests/models/forms/reducers/properties.test.ts +++ b/packages/core-tests/models/forms/reducers/properties.test.ts @@ -1,4 +1,3 @@ -/// import { testFocusNodeState, testPropertyState, testStore } from '@shaperone/testing/models/form.js' import $rdf from '@shaperone/testing/env.js' import { expect } from 'chai' diff --git a/packages/core-tests/package.json b/packages/core-tests/package.json index f7c39905..a11e533d 100644 --- a/packages/core-tests/package.json +++ b/packages/core-tests/package.json @@ -4,7 +4,7 @@ "version": "0.1.1", "type": "module", "scripts": { - "test": "mocha \"**/*.ts\"" + "test": "mocha \"**/*.ts\" --exclude \"node_modules/**/*.ts\"" }, "devDependencies": { "@hydrofoil/shaperone-core": "*", @@ -29,7 +29,7 @@ }, "mocha": { "require": [ - "./test-setup.js" + "./test-setup.ts" ], "loader": "ts-node/esm/transpile-only" } diff --git a/packages/core-tests/test-setup.js b/packages/core-tests/test-setup.ts similarity index 75% rename from packages/core-tests/test-setup.js rename to packages/core-tests/test-setup.ts index 14a29eee..d8f07bf9 100644 --- a/packages/core-tests/test-setup.js +++ b/packages/core-tests/test-setup.ts @@ -3,6 +3,7 @@ import chaiQuantifiers from 'chai-quantifiers' import * as chai from 'chai' import sinonChai from 'sinon-chai' import chaiSubset from 'chai-subset' +import type { RequiredEnvironment } from '@hydrofoil/shaperone-core/env.js' import { setEnv } from '@hydrofoil/shaperone-core/env.js' import rdf from '@zazuko/env' @@ -12,6 +13,6 @@ chai.use(chaiSubset) export const mochaHooks = { beforeAll() { - setEnv(rdf) + setEnv(rdf as unknown as RequiredEnvironment) }, }