Skip to content

Commit 4439ebe

Browse files
committed
deleteme: debug pipes
1 parent 26a7264 commit 4439ebe

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.github/workflows/build-node.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
build:
3030
strategy:
3131
matrix:
32-
node-version: ['18.x', '20.x', '22.x']
32+
node-version: ['18.x', '20.x', '22.x', '24.x']
3333

3434
runs-on:
3535
- ubuntu-latest
@@ -41,12 +41,16 @@ jobs:
4141
uses: actions/checkout@v4
4242

4343
- name: Use Node.js ${{ matrix.node-version }}
44-
uses: actions/setup-node@v3
44+
uses: actions/setup-node@v4
4545
with:
4646
node-version: ${{ matrix.node-version }}
4747
cache: 'npm'
4848

49-
- run: npm ci
50-
- run: npm run build
51-
- run: npm run test
52-
- run: npm run lint
49+
- name: Install, build, lint, test
50+
environment:
51+
NODEV=${{ matrix.node-version }}
52+
run: |
53+
npm ci
54+
npm run build
55+
npm test
56+
npm run lint

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"docs-readme": "npx doctoc --github readme.md && sed -i 's/%5C_/_/g' readme.md",
1414
"docs-changelog": "npx auto-changelog --output changelog.md --commit-limit false --sort-commits date --hide-empty-releases --ignore-commit-pattern 'acrontum/release' --breaking-pattern 'breaking change: '",
1515
"lint": "eslint '{src,test}/**/*.{js,ts,json}'",
16-
"test": "NODE_ENV=test node --test --require source-map-support/register 'dist/test/**/*.spec.js'",
16+
"test": "NODE_ENV=test node --test --require source-map-support/register dist/test/*.spec.js",
1717
"prepublishOnly": "./githooks/pre-push"
1818
},
1919
"bin": {

test/router.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe(relative(process.cwd(), __filename), async () => {
3030
await moxy.close({ closeConnections: true });
3131
});
3232

33-
await it('can configure routes', async () => {
33+
await it('can configure routes', async (context) => {
3434
await request.get('/example-routing/12345/measurements/76543').expect(404);
3535
await request.get('/example-routing/static/image.png').expect(404);
3636
await request.post('/example-routing/auth/login').expect(404);
@@ -51,7 +51,7 @@ describe(relative(process.cwd(), __filename), async () => {
5151
const proxy = new MoxyServer({ logging: 'error' });
5252
proxy.on('/test\\?q=asdf', { get: { status: 418 } });
5353
await proxy.listen();
54-
after(() => proxy.close({ closeConnections: true }));
54+
context.after(() => proxy.close({ closeConnections: true }));
5555

5656
assert.deepStrictEqual(routeConfig['proxied-server(?<path>.*)'] as PathConfig, {
5757
proxy: 'https://www.google.com:path',
@@ -342,12 +342,12 @@ describe(relative(process.cwd(), __filename), async () => {
342342
assert.strictEqual(Date.now() - start >= 100, true);
343343
});
344344

345-
await it('can proxy requests to another server', async () => {
345+
await it('can proxy requests to another server', async (context) => {
346346
const proxyTarget = new MoxyServer({ logging: 'error' });
347347
await proxyTarget.listen(0);
348-
after(async () => {
349-
await proxyTarget.close({ closeConnections: true });
350-
});
348+
/* eslint-disable-next-line no-console */
349+
console.log({ nodeV: process.env.NODEV, port: proxyTarget.server?.address() });
350+
context.after(() => proxyTarget.close({ closeConnections: true }));
351351

352352
proxyTarget.on('/this/request/was/proxied', {
353353
get: {

0 commit comments

Comments
 (0)