mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-22 08:38:29 +02:00
Fix curl export tests
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
import { describe, expect, test } from 'vitest';
|
import { describe, expect, test } from 'vitest';
|
||||||
import { pluginHookImport } from '../src';
|
import { pluginHookExport } from '../src';
|
||||||
|
|
||||||
describe('exporter-curl', () => {
|
describe('exporter-curl', () => {
|
||||||
test('Exports GET with params', () => {
|
test('Exports GET with params', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
urlParameters: [
|
urlParameters: [
|
||||||
{ name: 'a', value: 'aaa' },
|
{ name: 'a', value: 'aaa' },
|
||||||
@@ -18,7 +18,7 @@ describe('exporter-curl', () => {
|
|||||||
});
|
});
|
||||||
test('Exports POST with url form data', () => {
|
test('Exports POST with url form data', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
bodyType: 'application/x-www-form-urlencoded',
|
bodyType: 'application/x-www-form-urlencoded',
|
||||||
@@ -37,7 +37,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Exports PUT with multipart form', () => {
|
test('Exports PUT with multipart form', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
bodyType: 'multipart/form-data',
|
bodyType: 'multipart/form-data',
|
||||||
@@ -62,7 +62,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Exports JSON body', () => {
|
test('Exports JSON body', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
bodyType: 'application/json',
|
bodyType: 'application/json',
|
||||||
@@ -82,7 +82,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Exports headers', () => {
|
test('Exports headers', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
headers: [
|
headers: [
|
||||||
{ name: 'a', value: 'aaa' },
|
{ name: 'a', value: 'aaa' },
|
||||||
{ name: 'b', value: 'bbb', enabled: true },
|
{ name: 'b', value: 'bbb', enabled: true },
|
||||||
@@ -94,7 +94,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Basic auth', () => {
|
test('Basic auth', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
authenticationType: 'basic',
|
authenticationType: 'basic',
|
||||||
authentication: {
|
authentication: {
|
||||||
@@ -107,7 +107,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Broken basic auth', () => {
|
test('Broken basic auth', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
authenticationType: 'basic',
|
authenticationType: 'basic',
|
||||||
authentication: {},
|
authentication: {},
|
||||||
@@ -117,7 +117,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Digest auth', () => {
|
test('Digest auth', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
authenticationType: 'digest',
|
authenticationType: 'digest',
|
||||||
authentication: {
|
authentication: {
|
||||||
@@ -130,7 +130,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Bearer auth', () => {
|
test('Bearer auth', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
authenticationType: 'bearer',
|
authenticationType: 'bearer',
|
||||||
authentication: {
|
authentication: {
|
||||||
@@ -142,7 +142,7 @@ describe('exporter-curl', () => {
|
|||||||
|
|
||||||
test('Broken bearer auth', () => {
|
test('Broken bearer auth', () => {
|
||||||
expect(
|
expect(
|
||||||
pluginHookImport({
|
pluginHookExport({
|
||||||
url: 'https://yaak.app',
|
url: 'https://yaak.app',
|
||||||
authenticationType: 'bearer',
|
authenticationType: 'bearer',
|
||||||
authentication: {
|
authentication: {
|
||||||
|
|||||||
Reference in New Issue
Block a user