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