Skip to content

Commit

Permalink
add ping route prefix test
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Waskiewicz <[email protected]>
  • Loading branch information
Tanner Reits and rwaskiewicz committed Feb 27, 2024
1 parent d9f6391 commit ad2cefd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/compiler/config/test/validate-dev-server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ describe('validateDevServer', () => {
expect(config.devServer.pingRoute).toBe('/my-ping');
});

it('should prefix pingRoute with a "/"', () => {
inputConfig.devServer = { ...inputDevServerConfig, pingRoute: 'my-ping' };
const { config } = validateConfig(inputConfig, mockLoadConfigInit());
expect(config.devServer.pingRoute).toBe('/my-ping');
});

it('should clear ping route if set to null', () => {
inputConfig.devServer = { ...inputDevServerConfig, pingRoute: null };
const { config } = validateConfig(inputConfig, mockLoadConfigInit());
Expand Down

0 comments on commit ad2cefd

Please sign in to comment.