Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,349 changes: 285 additions & 4,064 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@
"types",
"eikjson.d.ts"
],
"tap": {
"exclude": [
"test/**/*.d.ts",
"test/fixtures/**"
]
},
"scripts": {
"clean": "rimraf .tap node_modules types",
"clean": "node -e \"['.tap', 'node_modules', 'types'].forEach(d => require('fs').rmSync(d, {recursive: true, force: true}))\"",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"schema:types": "json2ts lib/schemas/eikjson.schema.json > eikjson.d.ts",
"schema:outdated": "npm run schema:types && git diff --exit-code HEAD:eikjson.d.ts eikjson.d.ts",
"test": "tap --disable-coverage --allow-empty-coverage",
"test": "node --test 'test/**/*.test.js'",
"types": "run-s types:module types:test",
"types:module": "tsc",
"types:test": "tsc --project tsconfig.test.json"
Expand Down Expand Up @@ -54,6 +48,7 @@
"@eik/semantic-release-config": "1.0.17",
"@eik/typescript-config": "1.0.2",
"@eik/eslint-config": "2.0.6",
"@types/node": "25.0.1",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@types/is-glob": "4.0.4",
Expand All @@ -65,10 +60,8 @@
"json-schema-to-typescript": "15.0.4",
"npm-run-all2": "9.0.1",
"prettier": "3.8.3",
"rimraf": "6.1.3",
"semantic-release": "25.0.3",
"stoppable": "1.1.0",
"tap": "21.7.4",
"typescript": "6.0.3"
}
}
27 changes: 15 additions & 12 deletions test/classes/eik-config/cwd.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test } from "tap";
import { test } from "node:test";
import assert from "node:assert/strict";
import EikConfig from "../../../lib/classes/eik-config.js";

const validEikConfig = {
Expand All @@ -8,27 +9,29 @@ const validEikConfig = {
version: "0.0.0",
};

test("EikConfig: .cwd set to /some/path", (t) => {
test("EikConfig: .cwd set to /some/path", () => {
const config = new EikConfig(validEikConfig, [], "/some/path");
t.equal(config.cwd, "/some/path", "should equal the given cwd");
t.end();
assert.strictEqual(config.cwd, "/some/path", "should equal the given cwd");
});

test("EikConfig: .cwd set to /some/path/", (t) => {
test("EikConfig: .cwd set to /some/path/", () => {
const config = new EikConfig(validEikConfig, [], "/some/path/");
t.equal(config.cwd, "/some/path", "should normalize the given cwd");
t.end();
assert.strictEqual(
config.cwd,
"/some/path",
"should normalize the given cwd",
);
});

test("EikConfig: .cwd set to invalid relative path some/path", (t) => {
test("EikConfig: .cwd set to invalid relative path some/path", () => {
try {
new EikConfig(validEikConfig, [], "some/path");
} catch (err) {
t.match(
err instanceof Error ? err.message : String(err),
'"configRootDir" must be an absolute path:',
assert.ok(
(err instanceof Error ? err.message : String(err)).includes(
'"configRootDir" must be an absolute path:',
),
"should throw expected error with message",
);
}
t.end();
});
17 changes: 10 additions & 7 deletions test/classes/eik-config/map.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test } from "tap";
import { test } from "node:test";
import assert from "node:assert/strict";
import EikConfig from "../../../lib/classes/eik-config.js";

const validEikConfig = {
Expand All @@ -8,24 +9,26 @@ const validEikConfig = {
version: "0.0.0",
};

test("EikConfig: .map: set to string http://map", (t) => {
test("EikConfig: .map: set to string http://map", () => {
const config = new EikConfig({
...validEikConfig,
"import-map": "http://map",
});
t.same(config.map, ["http://map"], "should be wrapped into an array");
t.end();
assert.deepStrictEqual(
config.map,
["http://map"],
"should be wrapped into an array",
);
});

test("EikConfig: .map: set to an array with two values", (t) => {
test("EikConfig: .map: set to an array with two values", () => {
const config = new EikConfig({
...validEikConfig,
"import-map": ["http://map", "http://map"],
});
t.same(
assert.deepStrictEqual(
config.map,
["http://map", "http://map"],
"should remain the same as input",
);
t.end();
});
Loading
Loading