Skip to content
This repository was archived by the owner on Jun 24, 2024. It is now read-only.

Commit 4ed7d51

Browse files
committed
test: adjust ports, remove timeouts, add temp log
1 parent 5262ecd commit 4ed7d51

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

test/scenarios/non-optimistic.test.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const { resolve } = require;
44
const { spawn } = require('child_process');
55
const Client = require('@asset-pipe/client');
6-
const buildServerUri = 'http://127.0.0.1:7203';
6+
const buildServerUri = 'http://127.0.0.1:8250';
77
const supertest = require('supertest');
88
const request = supertest(buildServerUri);
99
const httpProxy = require('http-proxy');
@@ -18,7 +18,7 @@ async function startServer(env = 'development') {
1818
server = spawn('./node_modules/.bin/asset-pipe-server', [], {
1919
env: Object.assign({}, process.env, {
2020
NODE_ENV: env,
21-
PORT: 7203,
21+
PORT: 8251,
2222
}),
2323
});
2424
server.stdout.once('data', () => resolve());
@@ -35,16 +35,15 @@ async function startProxyServer() {
3535
const random = Math.random() * 1500 + 200;
3636
setTimeout(() => {
3737
proxy.web(req, res, {
38-
target: 'http://127.0.0.1:8200',
38+
target: 'http://127.0.0.1:8251',
3939
});
4040
}, random);
4141
})
42-
.listen(8300, resolve);
42+
.listen(8250, resolve);
4343
});
4444
}
4545

4646
beforeAll(async () => {
47-
jest.setTimeout(10000);
4847
await startServer();
4948
return startProxyServer();
5049
});
@@ -97,7 +96,6 @@ async function layout(label, podlets) {
9796

9897
test('Layout and 3 podlets - run 1 - initial', async () => {
9998
expect.assertions(2);
100-
jest.setTimeout(20000);
10199
const podlets = await Promise.all([podlet('a'), podlet('b'), podlet('c')]);
102100
const { jsFile, cssFile } = await layout('e', podlets);
103101

@@ -115,7 +113,6 @@ test('Layout and 3 podlets - run 1 - initial', async () => {
115113

116114
test('Layout and 3 podlets - run 2 - identical to run 1', async () => {
117115
expect.assertions(2);
118-
jest.setTimeout(20000);
119116
const podlets = await Promise.all([podlet('a'), podlet('b'), podlet('c')]);
120117
const { jsFile, cssFile } = await layout('e', podlets);
121118

@@ -133,7 +130,6 @@ test('Layout and 3 podlets - run 2 - identical to run 1', async () => {
133130

134131
test('Layout and 3 podlets - run 3 - swapped bundling order', async () => {
135132
expect.assertions(2);
136-
jest.setTimeout(20000);
137133
const podlets = await Promise.all([podlet('b'), podlet('c'), podlet('a')]);
138134
const { jsFile, cssFile } = await layout('e', podlets);
139135

@@ -151,7 +147,6 @@ test('Layout and 3 podlets - run 3 - swapped bundling order', async () => {
151147

152148
test('Layout and 3 podlets - run 5 - js minification via NODE_ENV=production', async () => {
153149
expect.assertions(1);
154-
jest.setTimeout(20000);
155150

156151
server.kill();
157152
await startServer('production');
@@ -171,7 +166,6 @@ test('Layout and 3 podlets - run 5 - js minification via NODE_ENV=production', a
171166

172167
test('Layout and 3 podlets - run 6 - minification and all entrypoints run', async () => {
173168
expect.assertions(3);
174-
jest.setTimeout(20000);
175169

176170
server.kill();
177171
await startServer('production');

test/sinks/gcs.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const {
1313

1414
async function startTestServer(sink) {
1515
const app = express();
16-
const assets = new AssetServer(sink);
16+
const assets = new AssetServer(sink, { env: 'development' });
17+
console.log(assets.options.env);
1718
app.use(assets.router());
1819
return new Promise(resolve => {
1920
const server = app.listen(() => {

0 commit comments

Comments
 (0)