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
2 changes: 1 addition & 1 deletion .github/workflows/dispatch-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
test:
name: On-Demand Unit Testing on Node.js v${{ inputs.node-version }}
uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2
uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.4
secrets: inherit
with:
pwsh: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ on:
jobs:
publish:
name: Publish NPM Package
uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.1.0
uses: WJSoftware/cicd/.github/workflows/npm-publish.yml@v0.4
secrets: inherit
with:
node-version: ${{ inputs.node-version }}
npm_tag: latest
dry_run: ${{ inputs.dry-run }}
npm-tag: latest
dry-run: ${{ inputs.dry-run }}
2 changes: 1 addition & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
test:
name: Unit Testing
uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.2
uses: WJSoftware/cicd/.github/workflows/npm-test.yml@v0.4
secrets: inherit
with:
pwsh: false
Expand Down
123 changes: 50 additions & 73 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"test": "ts-mocha -n loader=ts-node/esm -p ./tsconfig.json ./src/tests/**/*.test.ts",
"test": "ts-mocha -n loader=ts-node/esm -p ./tsconfig.json ./tests/**/*.test.ts",
"build": "tsc && publint",
"prebuild": "npm run test",
"prepublishOnly": "npm run build"
Expand Down Expand Up @@ -40,12 +40,12 @@
"devDependencies": {
"@types/chai": "^5.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.1",
"@types/node": "^24.0.3",
"@types/sinon": "^17.0.3",
"chai": "^5.1.2",
"mocha": "^11.1.0",
"mocha": "^11.7.1",
"publint": "^0.3.9",
"sinon": "^20.0.0",
"sinon": "^21.0.0",
"ts-mocha": "^11.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
Expand Down
6 changes: 3 additions & 3 deletions src/tests/DrFetch.test.ts → tests/DrFetch.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect } from "chai";
import { describe, test } from "mocha";
import { fake } from 'sinon';
import { DrFetch } from "../DrFetch.js";
import type { FetchFnInit, FetchFnUrl, StatusCode } from "../types.js";
import { getHeader } from "../headers.js";
import { DrFetch } from "../src/DrFetch.js";
import type { FetchFnInit, FetchFnUrl, StatusCode } from "../src/types.js";
import { getHeader } from "../src/headers.js";

const shortcutMethodsWithBody = [
'post',
Expand Down
2 changes: 1 addition & 1 deletion src/tests/headers.test.ts → tests/headers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import { describe, test } from 'mocha';
import { getHeader, hasHeader, makeIterableHeaders, setHeaders } from '../headers.js';
import { getHeader, hasHeader, makeIterableHeaders, setHeaders } from '../src/headers.js';

describe('setHeaders', () => {
test("Should throw an error whenever the 'init' argument is undefined.", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/index.test.ts → tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('index', () => {
];

// Act.
const module = await import('../index.js');
const module = await import('../src/index.js');
for (const name of expectedExports) {
expect(module, `Expected object '${name}' is not exported.`).to.have.property(name);
}
Expand Down