Skip to content

Commit

Permalink
Modify test describe block
Browse files Browse the repository at this point in the history
  • Loading branch information
nrayburn-tech committed Jul 24, 2024
1 parent 2bce185 commit 8c61cc6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/lib-http-proxy-common-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { setupOutgoing, setupSocket } from '../lib/common';
import { parse } from 'url';
import { describe, expect, it } from 'vitest';

describe('lib/http-proxy/common.ts', () => {
describe('lib/common.ts', () => {
describe('#setupOutgoing', () => {
it('should setup the correct headers', () => {
const outgoing = {};
Expand Down
8 changes: 4 additions & 4 deletions test/lib-http-proxy-passes-web-incoming-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { createServer, get, request } from 'http';
import { describe, expect, it } from 'vitest';
import { waitForClosed } from './util';

describe('lib/http-proxy/passes/web-incoming.ts', () => {
describe('lib/passes/web-incoming.ts', () => {
describe('#deleteLength', () => {
it('should change `content-length` for DELETE requests', () => {
const stubRequest = {
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('#createProxy.web() using own http server', () => {
source.emit('request', req, res);
}, 100);
});
})
});

proxyServer.listen('8081');
source.listen('8080');
Expand All @@ -184,7 +184,7 @@ describe('#createProxy.web() using own http server', () => {
hasContinue = true;
req.write(postData);
req.end();
})
});

await waitForClosed(proxyServer, source);

Expand Down Expand Up @@ -508,7 +508,7 @@ describe('#createProxy.web() using own http server', () => {
});

it('should proxy requests to multiple servers with different options', async () => {
const proxy = createProxy({target: 'http://ignored:8080'});
const proxy = createProxy({ target: 'http://ignored:8080' });

// proxies to two servers depending on url, rewriting the url as well
// http://127.0.0.1:8080/s1/ -> http://127.0.0.1:8081/
Expand Down
2 changes: 1 addition & 1 deletion test/lib-http-proxy-passes-web-outgoing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../lib/passes/web-outgoing';
import { beforeEach, describe, expect, it } from 'vitest';

describe('lib/http-proxy/passes/web-outgoing.ts', () => {
describe('lib/passes/web-outgoing.ts', () => {
let testContext;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/lib-http-proxy-passes-ws-incoming-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { checkMethodAndHeader, XHeaders } from '../lib/passes/ws-incoming';
import { describe, expect, it } from 'vitest';

describe('lib/http-proxy/passes/ws-incoming.ts', () => {
describe('lib/passes/ws-incoming.ts', () => {
describe('#checkMethodAndHeader', () => {
it('should drop non-GET connections', () => {
let destroyCalled = false,
Expand Down
4 changes: 2 additions & 2 deletions test/lib-http-proxy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Object.defineProperty(gen, 'port', {
},
});

describe('lib/http-proxy.js', () => {
describe('lib/index.js', () => {
describe('#createProxy', () => {
it('should not throw without options', function () {
createProxy();
});
it('should throw with empty options', function () {
createProxy({});
})
});

it('should return an object otherwise', () => {
const obj = createProxy({
Expand Down
2 changes: 1 addition & 1 deletion test/lib-https-proxy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Object.defineProperty(gen, 'port', {
},
});

describe('lib/http-proxy.js', () => {
describe('lib/index.js', () => {
describe('HTTPS #createProxy', () => {
describe('HTTPS to HTTP', () => {
it('should proxy the request en send back the response', async () => {
Expand Down

0 comments on commit 8c61cc6

Please sign in to comment.