Skip to content

Commit 459828c

Browse files
Amend test
1 parent 47af979 commit 459828c

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

dotcom-rendering/src/client/decidePublicPath.test.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,11 @@ describe('decidePublicPath', () => {
1717

1818
mockFrontendAssetsFullURL('https://assets.guim.co.uk/');
1919

20-
process.env = { NODE_ENV: undefined, HOSTNAME: undefined };
20+
process.env = { USE_LOCAL_ASSETS: undefined };
2121
});
2222

23-
it('with development flag', () => {
24-
process.env.NODE_ENV = 'development';
25-
expect(decidePublicPath()).toEqual('/assets/');
26-
});
27-
28-
it('with production flag', () => {
29-
process.env.NODE_ENV = 'production';
30-
expect(decidePublicPath()).toEqual('https://assets.guim.co.uk/assets/');
31-
});
32-
33-
it('with production flag in CI', () => {
34-
process.env.NODE_ENV = 'production';
35-
process.env.CI = 'true';
23+
it('with USE_LOCAL_ASSETS flag', () => {
24+
process.env.USE_LOCAL_ASSETS = 'true';
3625
expect(decidePublicPath()).toEqual('/assets/');
3726
});
3827

0 commit comments

Comments
 (0)