Skip to content

Commit

Permalink
Merge pull request #530 from zazuko/node-test
Browse files Browse the repository at this point in the history
Migrate some more plugins to native node test
  • Loading branch information
ludovicm67 authored Oct 9, 2024
2 parents 960e519 + ec32a52 commit 3c2b37e
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 25 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/entity-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "index.js",
"scripts": {
"example-instance": "node ./examples/run-instance.js",
"test": "c8 --all --reporter=lcovonly --reporter=text mocha"
"test": "c8 --all --reporter lcovonly --reporter text node --test **/*.test.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,7 +34,6 @@
"devDependencies": {
"@rdfjs/types": "^1.1.2",
"c8": "^10.1.2",
"mocha": "^10.7.3",
"trifid-handler-fetch": "^3.3.1",
"trifid-plugin-yasgui": "^3.1.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/entity-renderer/test/entity-renderer.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { strictEqual } from 'node:assert'
import { describe, it, beforeEach, afterEach } from 'mocha'
import { describe, it, beforeEach, afterEach } from 'node:test'
import { getListenerURL } from 'trifid-core'

import { createTrifidInstance } from '../examples/instance.js'
Expand Down
3 changes: 1 addition & 2 deletions packages/graph-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"scripts": {
"coverage": "codecov",
"test": "c8 --all --reporter=lcovonly --reporter=text mocha"
"test": "c8 --all --reporter=lcovonly --reporter=text node --test **/*.test.js"
},
"dependencies": {
"@fastify/static": "^8.0.1",
Expand All @@ -26,7 +26,6 @@
"devDependencies": {
"@types/node": "^22.7.4",
"c8": "^10.1.2",
"mocha": "^10.7.3",
"trifid-core": "^5.0.0"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @ts-check

import { strictEqual } from 'node:assert'
import { describe, it, beforeEach, afterEach } from 'node:test'

import trifidCore from 'trifid-core'
import { describe } from 'mocha'

import trifidPluginFactory from '../index.js'

Expand Down
3 changes: 1 addition & 2 deletions packages/handler-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"CHANGELOG.md"
],
"scripts": {
"test": "c8 --all --reporter lcovonly --reporter text mocha",
"test": "c8 --all --reporter lcovonly --reporter text node --test **/*.test.js",
"prebuild": "rimraf dist/",
"build": "tsc",
"prepack": "npm run build"
Expand All @@ -35,7 +35,6 @@
"@types/node": "^22.7.4",
"@types/uuid": "^10.0.0",
"c8": "^10.1.2",
"mocha": "^10.7.3",
"rimraf": "^6.0.1",
"trifid-core": "^5.0.0",
"typescript": "^5.5.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/handler-fetch/test/handler-fetch.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { strictEqual, notStrictEqual } from 'node:assert'
import { describe, it } from 'mocha'
import { describe, it, before } from 'node:test'
import oxigraph from 'oxigraph'
import { performOxigraphQuery } from '../lib/query.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/handler-fetch/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { strictEqual } from 'node:assert'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe, it } from 'node:test'

import { describe, it } from 'mocha'
import trifidCore, { getListenerURL, assertRejection } from 'trifid-core'

import handlerFetchTrifidPlugin from '../index.js'
Expand Down
3 changes: 1 addition & 2 deletions packages/markdown-content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"types": "dist/index.d.ts",
"scripts": {
"test": "c8 --all --reporter=lcovonly --reporter=text mocha",
"test": "c8 --all --reporter=lcovonly --reporter=text node --test **/*.test.js",
"prebuild": "rimraf dist/",
"build": "tsc",
"prepack": "npm run build"
Expand Down Expand Up @@ -41,7 +41,6 @@
"devDependencies": {
"@types/node": "^22.7.4",
"c8": "^10.1.2",
"mocha": "^10.7.3",
"rimraf": "^6.0.1",
"trifid-core": "^5.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown-content/test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { strictEqual } from 'node:assert'
import { describe, it } from 'mocha'
import { describe, it } from 'node:test'

import trifidCore, { getListenerURL } from 'trifid-core'
import markdownContentTrifidPlugin from '../src/index.js'
Expand Down
3 changes: 1 addition & 2 deletions packages/spex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"url": "https://github.com/zazuko/trifid/issues"
},
"scripts": {
"test": "c8 --all --reporter=lcovonly --reporter=text mocha"
"test": "c8 --all --reporter=lcovonly --reporter=text node --test **/*.test.js"
},
"dependencies": {
"@fastify/static": "^8.0.1",
Expand All @@ -28,7 +28,6 @@
],
"devDependencies": {
"c8": "^10.1.2",
"mocha": "^10.7.3",
"trifid-core": "^5.0.0"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @ts-check

import { strictEqual } from 'node:assert'
import { describe, it, beforeEach, afterEach } from 'node:test'

import trifidCore from 'trifid-core'
import { describe } from 'mocha'

import trifidPluginFactory from '../index.js'

Expand Down
3 changes: 1 addition & 2 deletions packages/yasgui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"scripts": {
"prepare": "esbuild --minify --bundle plugins/map.js --outdir=dist --splitting --format=esm",
"test": "c8 --all --reporter=lcovonly --reporter=text mocha"
"test": "c8 --all --exclude dist --reporter=lcovonly --reporter=text node --test **/*.test.js"
},
"dependencies": {
"@fastify/static": "^8.0.1",
Expand All @@ -34,7 +34,6 @@
"@openlayers-elements/swisstopo": "^0.3.0",
"c8": "^10.1.2",
"esbuild": "^0.24.0",
"mocha": "^10.7.3",
"trifid-core": "^5.0.0"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @ts-check

import { strictEqual } from 'node:assert'
import { describe, it, beforeEach, afterEach } from 'node:test'

import trifidCore from 'trifid-core'
import { describe } from 'mocha'

import trifidPluginFactory from '../index.js'

Expand Down

0 comments on commit 3c2b37e

Please sign in to comment.