diff --git a/bin/cml/asset/publish.e2e.test.js b/bin/cml/asset/publish.e2e.test.js index 21d84de2b..b23038beb 100644 --- a/bin/cml/asset/publish.e2e.test.js +++ b/bin/cml/asset/publish.e2e.test.js @@ -125,7 +125,7 @@ describe('CML e2e', () => { 'assets/test.svg' ); - expect(output.startsWith('https://')).toBe(true); + expect(output.startsWith('/uploads/')).toBe(true); }); test('cml publish /nonexistent produces file error', async () => { diff --git a/src/cml.e2e.test.js b/src/cml.e2e.test.js index 02d19d953..1f7805053 100644 --- a/src/cml.e2e.test.js +++ b/src/cml.e2e.test.js @@ -144,8 +144,8 @@ describe('Gitlab tests', () => { native: true }); - expect(output.startsWith('https://')).toBe(true); - expect(output.includes('cml=png')).toBe(true); + expect(output.startsWith('/uploads/')).toBe(true); + expect(output.includes('cml=png')).toBe(false); }); test('Publish image using gl with markdown', async () => { @@ -159,9 +159,9 @@ describe('Gitlab tests', () => { native: true }); - expect(output.startsWith('![](https://')).toBe(true); + expect(output.startsWith('![](/uploads/')).toBe(true); expect(output.endsWith(` "${title}")`)).toBe(true); - expect(output.includes('cml=png')).toBe(true); + expect(output.includes('cml=png')).toBe(false); }); test('Publish a non image file using gl in markdown', async () => { @@ -175,9 +175,9 @@ describe('Gitlab tests', () => { native: true }); - expect(output.startsWith(`[${title}](https://`)).toBe(true); + expect(output.startsWith(`[${title}](/uploads/`)).toBe(true); expect(output.endsWith(')')).toBe(true); - expect(output.includes('cml=pdf')).toBe(true); + expect(output.includes('cml=pdf')).toBe(false); }); test('Publish a non image file using native', async () => { @@ -191,9 +191,9 @@ describe('Gitlab tests', () => { native: true }); - expect(output.startsWith(`[${title}](https://`)).toBe(true); + expect(output.startsWith(`[${title}](/uploads/`)).toBe(true); expect(output.endsWith(')')).toBe(true); - expect(output.includes('cml=pdf')).toBe(true); + expect(output.includes('cml=pdf')).toBe(false); }); test('Publish should fail with an invalid driver', async () => {