Skip to content

Commit f7408fd

Browse files
test: auto value for the publicPath option (#736)
1 parent 6c8b860 commit f7408fd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/middleware.test.js

+19
Original file line numberDiff line numberDiff line change
@@ -2793,6 +2793,25 @@ describe('middleware', () => {
27932793
request(app).get('/public/bundle.js').expect(200, done);
27942794
});
27952795
});
2796+
2797+
describe('should work with "auto" value', () => {
2798+
beforeAll((done) => {
2799+
const compiler = getCompiler(webpackConfig);
2800+
2801+
instance = middleware(compiler, { publicPath: 'auto' });
2802+
2803+
app = express();
2804+
app.use(instance);
2805+
2806+
listen = listenShorthand(done);
2807+
});
2808+
2809+
afterAll(close);
2810+
2811+
it('should return the "200" code for the "GET" request to the bundle file', (done) => {
2812+
request(app).get('/bundle.js').expect(200, done);
2813+
});
2814+
});
27962815
});
27972816

27982817
describe('serverSideRender option', () => {

0 commit comments

Comments
 (0)