diff --git a/plugins/exporter-curl/src/index.ts b/plugins/exporter-curl/src/index.ts index 3c21682f..c4f06a02 100644 --- a/plugins/exporter-curl/src/index.ts +++ b/plugins/exporter-curl/src/index.ts @@ -52,7 +52,7 @@ export async function pluginHookExport(_ctx: Context, request: Partial { ); }); + test('Exports POST with GraphQL data no variables', async () => { + expect( + await pluginHookExport(ctx, { + url: 'https://yaak.app', + method: 'POST', + bodyType: 'graphql', + body: { + query : '{foo,bar}', + }, + }), + ).toEqual( + [`curl -X POST 'https://yaak.app'`, `--data-raw '{"query":"{foo,bar}"}'`].join(` \\\n `), + ); + }); + test('Exports PUT with multipart form', async () => { expect( await pluginHookExport(ctx, {