Skip to content

Commit

Permalink
fixup! Fix non-native uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Oct 24, 2024
1 parent 46d7e02 commit 3612a9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/cml/asset/publish.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
16 changes: 8 additions & 8 deletions src/cml.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand All @@ -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 () => {
Expand All @@ -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 () => {
Expand Down

0 comments on commit 3612a9b

Please sign in to comment.